class HttpRequest: (source)
Known subclasses: django.core.handlers.asgi.ASGIRequest
, django.core.handlers.wsgi.WSGIRequest
A basic HTTP request.
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | accepts |
Undocumented |
Method | build |
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... |
Method | close |
Undocumented |
Method | encoding |
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 | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Return the HTTP host using the environment or request headers. |
Method | get |
Return the port number for the request as a string. |
Method | get |
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 |
Undocumented |
Method | parse |
Return a tuple of (POST QueryDict, FILES MultiValueDict). |
Method | read |
Undocumented |
Method | readline |
Undocumented |
Method | readlines |
Undocumented |
Method | upload |
Undocumented |
Instance Variable | content |
Undocumented |
Instance Variable | content |
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 |
Undocumented |
Instance Variable | POST |
Undocumented |
Instance Variable | resolver |
Undocumented |
Instance Variable | upload |
Undocumented |
Property | accepted |
Return a list of MediaType instances. |
Property | body |
Undocumented |
Property | encoding |
Undocumented |
Property | headers |
Undocumented |
Property | scheme |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Return the HTTP host using the environment or request headers. Skip allowed hosts protection, so may return an insecure host. |
Method | _get |
Hook for subclasses like WSGIRequest to implement. Return 'http' by default. |
Method | _initialize |
Undocumented |
Method | _load |
Populate self._post and self._files if the content-type is a form type |
Method | _mark |
Undocumented |
Method | _set |
Set content_type, content_params, and encoding. |
Instance Variable | _encoding |
Undocumented |
Instance Variable | _files |
Undocumented |
Instance Variable | _post |
Undocumented |
Instance Variable | _read |
Undocumented |
Instance Variable | _upload |
Undocumented |
Property | _current |
Undocumented |
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.
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).
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.
Return the HTTP host using the environment or request headers. Skip allowed hosts protection, so may return an insecure host.