Content deleted Content added
Line 35:
==Example of calling an application==
{{Expand section|date=March 2011}}
An example of calling an application and retrieving its response. A web server gives a callback start_response to a web framework application. start_response has a [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Response_message http protocol] status, headers and body. For Django, a [https://docs.djangoproject.com/en/1.10/ref/request-response/#httpresponse-objects HttpResponse] object returned<ref>[https://github.com/django/django/blob/master/django/http/response.py#L287 Response object code on github]</ref>.
<source lang="python">
def call_application(app, environ):
|