class documentation

class HttpRequest:

Known subclasses: django.core.handlers.asgi.ASGIRequest, django.core.handlers.wsgi.WSGIRequest

View In Hierarchy

A basic HTTP request.
Method __iter__ Undocumented
Method accepts Undocumented
Method build​_absolute​_uri No summary
Method get​_full​_path Undocumented
Method get​_full​_path​_info Undocumented
Method get​_host Return the HTTP host using the environment or request headers.
Method get​_port Return the port number for the request as a string.
Method get​_signed​_cookie Attempt to return a signed cookie. If the signature fails or the cookie has expired, raise an exception, unless the default argument is provided, in which case return that value.
Method is​_secure Undocumented
Method read Undocumented
Method readline Undocumented
Method readlines Undocumented
Instance Variable content​_params Undocumented
Instance Variable content​_type Undocumented
Instance Variable COOKIES Undocumented
Instance Variable FILES Undocumented
Instance Variable GET Undocumented
Instance Variable META Undocumented
Instance Variable method Undocumented
Instance Variable path Undocumented
Instance Variable path​_info Undocumented
Instance Variable POST Undocumented
Instance Variable resolver​_match Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method ​_get​_full​_path Undocumented
Method ​_get​_raw​_host Return the HTTP host using the environment or request headers. Skip allowed hosts protection, so may return an insecure host.
Method ​_get​_scheme Hook for subclasses like WSGIRequest to implement. Return 'http' by default.
Method ​_initialize​_handlers Undocumented
Method ​_load​_post​_and​_files Populate self._post and self._files if the content-type is a form type
Method ​_mark​_post​_parse​_error Undocumented
Method ​_set​_content​_type​_params Set content_type, content_params, and encoding.
Method close Undocumented
Method encoding.setter Set the encoding used for GET/POST accesses. If the GET or POST dictionary has already been created, remove and recreate it on the next access (so that it is decoded correctly).
Method parse​_file​_upload Return a tuple of (POST QueryDict, FILES MultiValueDict).
Method upload​_handlers.setter Undocumented
Instance Variable ​_encoding Undocumented
Instance Variable ​_files Undocumented
Instance Variable ​_post Undocumented
Instance Variable ​_read​_started Undocumented
Instance Variable ​_upload​_handlers Undocumented
Instance Variable upload​_handlers Undocumented
Property ​_current​_scheme​_host Undocumented
Property accepted​_types Return a list of MediaType instances.
Property body Undocumented
Property encoding Undocumented
Property headers Undocumented
Property scheme Undocumented
def __iter__(self):

Undocumented

def accepts(self, media_type):

Undocumented

def build_absolute_uri(self, location=None):
Build an absolute URI from the location and the variables available in this request. If no location is specified, build the absolute URI using request.get_full_path(). If the location is absolute, convert it to an RFC 3987 compliant URI and return it. If location is relative or is scheme-relative (i.e., //example.com/), urljoin() it to a base URL constructed from the request variables.
def get_full_path(self, force_append_slash=False):

Undocumented

def get_full_path_info(self, force_append_slash=False):

Undocumented

def get_host(self):
Return the HTTP host using the environment or request headers.
def get_port(self):
Return the port number for the request as a string.
def get_signed_cookie(self, key, default=RAISE_ERROR, salt='', max_age=None):
Attempt to return a signed cookie. If the signature fails or the cookie has expired, raise an exception, unless the default argument is provided, in which case return that value.
def is_secure(self):

Undocumented

def read(self, *args, **kwargs):

Undocumented

def readline(self, *args, **kwargs):

Undocumented

def readlines(self):

Undocumented

content_params =

Undocumented

content_type =

Undocumented

def __repr__(self):

Undocumented

def _get_full_path(self, path, force_append_slash):

Undocumented

def _get_raw_host(self):
Return the HTTP host using the environment or request headers. Skip allowed hosts protection, so may return an insecure host.
def _get_scheme(self):
Hook for subclasses like WSGIRequest to implement. Return 'http' by default.
def _initialize_handlers(self):

Undocumented

def _load_post_and_files(self):
Populate self._post and self._files if the content-type is a form type
def _mark_post_parse_error(self):

Undocumented

def _set_content_type_params(self, meta):
Set content_type, content_params, and encoding.
def close(self):

Undocumented

@encoding.setter
def encoding(self, val):
Set the encoding used for GET/POST accesses. If the GET or POST dictionary has already been created, remove and recreate it on the next access (so that it is decoded correctly).
def parse_file_upload(self, META, post_data):
Return a tuple of (POST QueryDict, FILES MultiValueDict).
@upload_handlers.setter
def upload_handlers(self, upload_handlers):

Undocumented

_encoding =

Undocumented

_files =

Undocumented

_read_started: bool =
_upload_handlers =

Undocumented

@property
upload_handlers =

Undocumented

@cached_property
_current_scheme_host =

Undocumented

@cached_property
accepted_types =
Return a list of MediaType instances.
@property
body =

Undocumented

@property
encoding =

Undocumented

@cached_property
headers =

Undocumented

@property
scheme =

Undocumented