Package gluon :: Module http :: Class HTTP
[hide private]
[frames] | no frames]

Class HTTP

source code

              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        exceptions.Exception --+
                               |
                              HTTP

Raises an HTTP response

Args:
    status: usually an integer. If it's a well known status code, the ERROR
      message will be automatically added. A string can also be passed
      as `510 Foo Bar` and in that case the status code and the error
      message will be parsed accordingly
    body: what to return as body. If left as is, will return the error code
      and the status message in the body itself
    cookies: pass cookies along (usually not needed)
    headers: pass headers as usual dict mapping

Instance Methods [hide private]
 
__init__(self, status, body='', cookies=None, **headers)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
cookies2headers(self, cookies) source code
 
to(self, responder, env=None) source code
 
__str__(self)
stringify me
source code

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]
  message
compose a message describing this exception

Inherited from exceptions.BaseException: args

Inherited from object: __class__

Method Details [hide private]

__init__(self, status, body='', cookies=None, **headers)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

stringify me

Overrides: object.__str__

Property Details [hide private]

message


compose a message describing this exception

    "status defined_status [web2py_error]"

message elements that are not defined are omitted

Get Method:
unreachable.message(self) - compose a message describing this exception