http.HttpResponse.set_signed_cookie()

HttpResponse.set_signed_cookie(key, value, salt='', max_age=None, expires=None, path='/', domain=None, secure=None, httponly=True) Like set_cookie(), but cryptographic signing the cookie before setting it. Use in conjunction with HttpRequest.get_signed_cookie(). You can use the optional salt argument for added key strength, but you will need to remember to pass it to the corresponding HttpRequest.get_signed_cookie() call.

http.HttpResponse.setdefault()

HttpResponse.setdefault(header, value) Sets a header unless it has already been set.

http.HttpResponse.seekable()

HttpResponse.seekable() New in Django 1.10: Always False. This method makes an HttpResponse instance a stream-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.flush()

HttpResponse.flush() This method makes an HttpResponse instance a file-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.

http.HttpResponse.readable()

HttpResponse.readable() New in Django 1.10: Always False. This method makes an HttpResponse instance a stream-like object.

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.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.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