http.HttpRequest.xreadlines()

HttpRequest.xreadlines() [source]

http.HttpRequest.__iter__()

HttpRequest.__iter__() Methods implementing a file-like interface for reading from an HttpRequest instance. This makes it possible to consume an incoming request in a streaming fashion. A common use-case would be to process a big XML payload with an iterative parser without constructing a whole XML tree in memory. Given this standard interface, an HttpRequest instance can be passed directly to an XML parser such as ElementTree: import xml.etree.ElementTree as ET for element in ET.iterparse(r

http.HttpResponse

class HttpResponse [source] In contrast to HttpRequest objects, which are created automatically by Django, HttpResponse objects are your responsibility. Each view you write is responsible for instantiating, populating and returning an HttpResponse. The HttpResponse class lives in the django.http module.

http.HttpResponse.charset

HttpResponse.charset A string denoting the charset in which the response will be encoded. If not given at HttpResponse instantiation time, it will be extracted from content_type and if that is unsuccessful, the DEFAULT_CHARSET setting will be used.

http.HttpResponse.closed

HttpResponse.closed True if the response has been closed.

http.HttpResponse.content

HttpResponse.content A bytestring representing the content, encoded from a Unicode object if necessary.

http.HttpResponse.delete_cookie()

HttpResponse.delete_cookie(key, path='/', domain=None) Deletes the cookie with the given key. Fails silently if the key doesn’t exist. Due to the way cookies work, path and domain should be the same values you used in set_cookie() – otherwise the cookie may not be deleted.

http.HttpResponse.flush()

HttpResponse.flush() This method makes an HttpResponse instance a file-like object.

http.HttpResponse.getvalue()

HttpResponse.getvalue() [source] Returns the value of HttpResponse.content. This method makes an HttpResponse instance a stream-like object.

http.HttpResponse.has_header()

HttpResponse.has_header(header) Returns True or False based on a case-insensitive check for a header with the given name.