Docs for HTTP

[ Python Tutorial ] [ Python Libraries ] [ web2py epydoc ]

Description


<type 'type'> extends (<type 'exceptions.Exception'>,)













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


Attributes


HTTP.__class__ <type 'type'> extends (<type 'object'>,) belongs to class <type 'type'>
type(object) -> the object's type type(name, bases, dict) -> a new type

HTTP.__delattr__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__delattr__('name') <==> del x.name

HTTP.__dict__ <type 'dictproxy'> belongs to class <type 'dictproxy'>

HTTP.__doc__ <type 'str'> belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.

HTTP.__format__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>
default object formatter

HTTP.__getattribute__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__getattribute__('name') <==> x.name

HTTP.__getitem__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__getitem__(y) <==> x[y]

HTTP.__getslice__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__getslice__(i, j) <==> x[i:j] Use of negative indices is not supported.

HTTP.__hash__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__hash__() <==> hash(x)

HTTP.__init__ <type 'instancemethod'> belongs to class <type 'instancemethod'>

HTTP.__module__ <type 'str'> belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.

HTTP.__new__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
T.__new__(S, ...) -> a new object with type S, a subtype of T

HTTP.__reduce__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>

HTTP.__reduce_ex__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>
helper for pickle

HTTP.__repr__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__repr__() <==> repr(x)

HTTP.__setattr__ <type 'wrapper_descriptor'> belongs to class <type 'wrapper_descriptor'>
x.__setattr__('name', value) <==> x.name = value

HTTP.__setstate__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>

HTTP.__sizeof__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>
__sizeof__() -> int size of object in memory, in bytes

HTTP.__str__ <type 'instancemethod'> belongs to class <type 'instancemethod'>
stringify me

HTTP.__subclasshook__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
Abstract classes can override this to customize issubclass(). This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

HTTP.__unicode__ <type 'method_descriptor'> belongs to class <type 'method_descriptor'>

HTTP.__weakref__ <type 'getset_descriptor'> belongs to class <type 'getset_descriptor'>
list of weak references to the object (if defined)

HTTP.args <type 'getset_descriptor'> belongs to class <type 'getset_descriptor'>

HTTP.cookies2headers <type 'instancemethod'> belongs to class <type 'instancemethod'>

HTTP.message <type 'property'> belongs to class <type 'property'>
compose a message describing this exception "status defined_status [web2py_error]" message elements that are not defined are omitted

HTTP.to <type 'instancemethod'> belongs to class <type 'instancemethod'>