Package wsgiwapi :: Module wsgisupport :: Class HTTPError
[frames] | no frames]

Class HTTPError

source code

exceptions.Exception --+
                       |
          object --+   |
                   |   |
            Response --+
                       |
                      HTTPError

Instance Methods
 
__init__(self, status=500, message=None)
Create a new Response object.
source code

Inherited from exceptions.Exception: __getitem__, __str__

Inherited from Response: set_content_type

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables

Inherited from Response: VALID_STATUS_RE, status

Properties

Inherited from object: __class__

Method Details

__init__(self, status=500, message=None)
(Constructor)

source code 

Create a new Response object.

The body defaults to being empty, the status defaults to "200 OK", and the content_type defaults to 'text/plain'.

  • body: The value to store in the body member. Defaults to ''.
  • status: The status to set for the response. May be specified as a number, or as a string (optionally, with a reason phrase). Defaults to 200.
  • content_type: The content type to set for the response (as specified for the set_content_type() method). Defaults to 'text/plain'.
Overrides: object.__init__
(inherited documentation)