class documentation

class HttpResponseBase:

Known subclasses: django.http.HttpResponse, django.http.StreamingHttpResponse

View In Hierarchy

An HTTP response base class with dictionary-accessed headers.

This class doesn't handle content. It should not be used directly. Use the HttpResponse and StreamingHttpResponse subclasses instead.

Method __delitem__ Undocumented
Method __getitem__ Undocumented
Method __init__ Undocumented
Method __setitem__ Undocumented
Method charset.setter Undocumented
Method close Undocumented
Method delete​_cookie Undocumented
Method flush Undocumented
Method get Undocumented
Method has​_header Case-insensitive check for a header.
Method items Undocumented
Method make​_bytes Turn a value into a bytestring encoded in the output charset.
Method readable Undocumented
Method reason​_phrase.setter Undocumented
Method seekable Undocumented
Method serialize​_headers HTTP headers as a bytestring.
Method set​_cookie Set a cookie.
Method set​_signed​_cookie Undocumented
Method setdefault Set a header unless it has already been set.
Method tell Undocumented
Method writable Undocumented
Method write Undocumented
Method writelines Undocumented
Instance Variable ​_charset Undocumented
Instance Variable ​_handler​_class Undocumented
Instance Variable ​_reason​_phrase Undocumented
Instance Variable ​_resource​_closers Undocumented
Instance Variable closed Undocumented
Instance Variable cookies Undocumented
Instance Variable headers Undocumented
Instance Variable status​_code Undocumented
Property ​_content​_type​_for​_repr Undocumented
Property charset Undocumented
Property reason​_phrase Undocumented
def __delitem__(self, header):

Undocumented

def __getitem__(self, header):

Undocumented

def __init__(self, content_type=None, status=None, reason=None, charset=None, headers=None):
def __setitem__(self, header, value):

Undocumented

@charset.setter
def charset(self, value):

Undocumented

def close(self):

Undocumented

def delete_cookie(self, key, path='/', domain=None, samesite=None):

Undocumented

def flush(self):

Undocumented

def get(self, header, alternate=None):

Undocumented

def has_header(self, header):
Case-insensitive check for a header.
def items(self):

Undocumented

def make_bytes(self, value):
Turn a value into a bytestring encoded in the output charset.
def readable(self):

Undocumented

@reason_phrase.setter
def reason_phrase(self, value):

Undocumented

def seekable(self):

Undocumented

def serialize_headers(self):
HTTP headers as a bytestring.
def set_cookie(self, key, value='', max_age=None, expires=None, path='/', domain=None, secure=False, httponly=False, samesite=None):

Set a cookie.

expires can be: - a string in the correct format, - a naive datetime.datetime object in UTC, - an aware datetime.datetime object in any time zone. If it is a datetime.datetime object then calculate max_age.

def set_signed_cookie(self, key, value, salt='', **kwargs):

Undocumented

def setdefault(self, key, value):
Set a header unless it has already been set.
def tell(self):

Undocumented

def writable(self):

Undocumented

def write(self, content):

Undocumented

def writelines(self, lines):

Undocumented

_charset =

Undocumented

_handler_class =

Undocumented

_reason_phrase =

Undocumented

_resource_closers: list =

Undocumented

closed: bool =

Undocumented

cookies =

Undocumented

headers =

Undocumented

@property
_content_type_for_repr =

Undocumented

@property
charset =

Undocumented

@property
reason_phrase =

Undocumented