class documentation

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 closed Undocumented
Instance Variable cookies Undocumented
Instance Variable headers Undocumented
Instance Variable status_code Undocumented
Property charset Undocumented
Property reason_phrase Undocumented
Instance Variable _charset Undocumented
Instance Variable _handler_class Undocumented
Instance Variable _reason_phrase Undocumented
Instance Variable _resource_closers Undocumented
Property _content_type_for_repr Undocumented
def __delitem__(self, header): (source)

Undocumented

def __getitem__(self, header): (source)

Undocumented

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

Undocumented

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

Undocumented

def close(self): (source)

Undocumented

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

Undocumented

def flush(self): (source)

Undocumented

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

Undocumented

def has_header(self, header): (source)

Case-insensitive check for a header.

def items(self): (source)

Undocumented

def make_bytes(self, value): (source)

Turn a value into a bytestring encoded in the output charset.

def readable(self): (source)

Undocumented

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

Undocumented

def seekable(self): (source)

Undocumented

def serialize_headers(self): (source)

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): (source)

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``. ``max_age`` can be: - int/float specifying seconds, - ``datetime.timedelta`` object.

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

Undocumented

def setdefault(self, key, value): (source)

Set a header unless it has already been set.

def tell(self): (source)

Undocumented

def writable(self): (source)

Undocumented

def write(self, content): (source)

Undocumented

def writelines(self, lines): (source)

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

@property
reason_phrase = (source)

Undocumented

_charset = (source)

Undocumented

_handler_class = (source)

Undocumented

_reason_phrase = (source)

Undocumented

_resource_closers: list = (source)

Undocumented

@property
_content_type_for_repr = (source)

Undocumented