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

Public Member Functions

def mimetype (self)
 
def mimetype (self, value)
 
def mimetype_params (self)
 
def retry_after (self)
 
def retry_after (self, value)
 

Static Public Attributes

 location
 
 doc
 
 age
 
 content_type
 
 content_length
 
 content_location
 
 content_encoding
 
 content_md5
 
 content_security_policy
 
 content_security_policy_report_only
 
 date
 
 expires
 
 last_modified
 
 vary
 
 content_language
 
 allow
 

Detailed Description

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

Member Function Documentation

◆ mimetype() [1/2]

def mimetype (   self)
The mimetype (content type without charset etc.)

◆ mimetype() [2/2]

def mimetype (   self,
  value 
)

◆ 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'}``.

.. versionadded:: 0.5

◆ retry_after() [1/2]

def retry_after (   self)
The Retry-After response-header field can be used with a
503 (Service Unavailable) response to indicate how long the
service is expected to be unavailable to the requesting client.

Time in seconds until expiration or date.

◆ retry_after() [2/2]

def retry_after (   self,
  value 
)

Field Documentation

◆ age

age
static

◆ allow

allow
static

◆ content_encoding

content_encoding
static

◆ content_language

content_language
static

◆ content_length

content_length
static

◆ content_location

content_location
static

◆ content_md5

content_md5
static

◆ content_security_policy

content_security_policy
static

◆ content_security_policy_report_only

content_security_policy_report_only
static

◆ content_type

content_type
static

◆ date

date
static

◆ doc

doc
static

◆ expires

expires
static

◆ last_modified

last_modified
static

◆ location

location
static

◆ vary

vary
static

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