http.HttpResponse.write()

HttpResponse.write(content) [source] This method makes an HttpResponse instance a file-like object.

http.HttpResponse.writelines()

HttpResponse.writelines(lines) [source] Writes a list of lines to the response. Line separators are not added. This method makes an HttpResponse instance a stream-like object.

http.HttpResponse.__delitem__()

HttpResponse.__delitem__(header) Deletes the header with the given name. Fails silently if the header doesn’t exist. Case-insensitive.

http.HttpResponse.__getitem__()

HttpResponse.__getitem__(header) Returns the value for the given header name. Case-insensitive.

http.HttpResponse.__init__()

HttpResponse.__init__(content='', content_type=None, status=200, reason=None, charset=None) [source] Instantiates an HttpResponse object with the given page content and content type. content should be an iterator or a string. If it’s an iterator, it should return strings, and those strings will be joined together to form the content of the response. If it is not an iterator or a string, it will be converted to a string when accessed. content_type is the MIME type optionally completed by a ch

http.HttpResponse.__setitem__()

HttpResponse.__setitem__(header, value) Sets the given header name to the given value. Both header and value should be strings.

http.HttpResponseBadRequest

class HttpResponseBadRequest [source] Acts just like HttpResponse but uses a 400 status code.

http.HttpResponseForbidden

class HttpResponseForbidden [source] Acts just like HttpResponse but uses a 403 status code.

http.HttpResponseGone

class HttpResponseGone [source] Acts just like HttpResponse but uses a 410 status code.

http.HttpResponseNotAllowed

class HttpResponseNotAllowed [source] Like HttpResponse, but uses a 405 status code. The first argument to the constructor is required: a list of permitted methods (e.g. ['GET', 'POST']).