OpenQuizz
Une application de gestion des contenus pédagogiques
CommonRequestDescriptorsMixin Class Reference
Inheritance diagram for CommonRequestDescriptorsMixin:
Collaboration diagram for CommonRequestDescriptorsMixin:

Public Member Functions

def content_length (self)
 
def mimetype (self)
 
def mimetype_params (self)
 
def pragma (self)
 

Static Public Attributes

 content_type
 
 doc
 
 content_encoding
 
 content_md5
 
 referrer
 
 date
 
 max_forwards
 

Detailed Description

A mixin for :class:`BaseRequest` subclasses.  Request objects that
mix this class in will automatically get descriptors for a couple of
HTTP headers with automatic type conversion.

.. versionadded:: 0.5

Member Function Documentation

◆ content_length()

def content_length (   self)
The Content-Length entity-header field indicates the size of the
entity-body in bytes or, in the case of the HEAD method, the size of
the entity-body that would have been sent had the request been a
GET.

◆ mimetype()

def mimetype (   self)
Like :attr:`content_type`, but without parameters (eg, without
charset, type etc.) and always lowercase.  For example if the content
type is ``text/HTML; charset=utf-8`` the mimetype would be
``'text/html'``.

◆ mimetype_params()

def mimetype_params (   self)
The mimetype parameters as dict.  For example if the content
type is ``text/html; charset=utf-8`` the params would be
``{'charset': 'utf-8'}``.

◆ pragma()

def pragma (   self)
The Pragma general-header field is used to include
implementation-specific directives that might apply to any recipient
along the request/response chain.  All pragma directives specify
optional behavior from the viewpoint of the protocol; however, some
systems MAY require that behavior be consistent with the directives.

Field Documentation

◆ content_encoding

content_encoding
static

◆ content_md5

content_md5
static

◆ content_type

content_type
static

◆ date

date
static

◆ doc

doc
static

◆ max_forwards

max_forwards
static

◆ referrer

referrer
static

The documentation for this class was generated from the following file: