Package wsgitools :: Module applications :: Class StaticContent
[hide private]
[frames] | no frames]

Class StaticContent

source code


This wsgi application provides static content on whatever request it receives with method GET or HEAD (content stripped). If not present, a content-length header is computed.

Instance Methods [hide private]
 
__init__(self, status, headers, content, anymethod=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__call__(self, environ, start_response)
wsgi interface
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, status, headers, content, anymethod=False)
(Constructor)

source code 

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

Parameters:
  • status (str) - is the HTTP status returned to the browser (ex: "200 OK")
  • headers (list) - is a list of (header, value) pairs being delivered as HTTP headers
  • content (bytes) - contains the data to be delivered to the client. It is either a string or some kind of iterable yielding strings.
  • anymethod (boolean) - determines whether any request method should be answered with this response instead of a 501
Overrides: object.__init__