|
__call__(self,
environ,
start_response)
WSGI application interface |
|
|
|
__init__(self,
body=None,
status=None,
headerlist=None,
app_iter=None,
request=None,
content_type=None,
conditional_response=None,
**kw)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
|
|
__str__(self,
skip_body=False)
str(x) |
|
|
|
_abs_headerlist(self,
environ)
Returns a headerlist, with the Location header possibly made absolute
given the request environ. |
|
|
|
|
|
|
|
_app_iter__set(self,
value) |
|
|
|
_body__get(self)
The body of the response, as a ``str``. |
|
|
|
_body__set(self,
value='
' ) |
|
|
|
|
|
_body_file__get(self)
A file-like object that can be used to write to the body. |
|
|
|
_body_file__set(self,
file) |
|
|
|
_cache_control__del(self) |
|
|
|
_cache_control__get(self)
Get/set/modify the Cache-Control header (`HTTP spec section 14.9
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>`_) |
|
|
|
_cache_control__set(self,
value) |
|
|
|
|
|
|
|
_charset__get(self)
Get/set the charset (in the Content-Type) |
|
|
|
_charset__set(self,
charset) |
|
|
|
|
|
_content_type__get(self)
Get/set the Content-Type header (or None), *without* the charset or
any parameters. |
|
|
|
_content_type__set(self,
value) |
|
|
|
_content_type_params__del(self) |
|
|
|
|
|
_content_type_params__set(self,
value_dict) |
|
|
|
|
|
_environ__get(self)
Get/set the request environ associated with this response, if any. |
|
|
|
_environ__set(self,
value) |
|
|
|
|
|
_headerlist__get(self)
The list of response headers |
|
|
|
_headerlist__set(self,
value) |
|
|
|
_headers__get(self)
The headers in a dictionary-like object |
|
|
|
_headers__set(self,
value) |
|
|
|
|
|
_request__get(self)
Return the request associated with this response if any. |
|
|
|
_request__set(self,
value) |
|
|
|
_status__get(self)
The status string |
|
|
|
_status__set(self,
value) |
|
|
|
_status_int__get(self)
The status as an integer |
|
|
|
_status_int__set(self,
code) |
|
|
|
|
|
_text__get(self)
Get/set the unicode value of the body (using the charset of the
Content-Type) |
|
|
|
|
|
_update_cache_control(self,
prop_dict) |
|
|
|
app_iter_range(self,
start,
stop)
Return a new app_iter built from the response app_iter, that serves
up only the given ``start:stop`` range. |
|
|
|
conditional_response_app(self,
environ,
start_response)
Like the normal __call__ interface, but checks conditional headers: |
|
|
|
copy(self)
Makes a copy of the response |
|
|
|
|
|
delete_cookie(self,
key,
path=' / ' ,
domain=None)
Delete a cookie from the client. |
|
|
|
encode_content(self,
encoding=' gzip ' ,
lazy=False)
Encode the content with the given encoding (only gzip and identity
are supported). |
|
|
|
md5_etag(self,
body=None,
set_content_md5=False)
Generate an etag for the response object using an MD5 hash of the
body (the body parameter, or ``self.body`` if not given) |
|
|
|
merge_cookies(self,
resp)
Merge the cookies that were set on this response with the given
`resp` object (which can be any WSGI application). |
|
|
|
set_cookie(self,
key,
value='
' ,
max_age=None,
path=' / ' ,
domain=None,
secure=False,
httponly=False,
comment=None,
expires=None,
overwrite=False)
Set (add) a cookie for the response |
|
|
|
unset_cookie(self,
key,
strict=True)
Unset a cookie with the given name (remove it from the response). |
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
|
accept_ranges
Gets and sets the ``Accept-Ranges`` header (`HTTP spec section 14.5
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.5>`_).
|
|
age
Gets and sets the ``Age`` header (`HTTP spec section 14.6
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.6>`_).
|
|
allow
Gets and sets the ``Allow`` header (`HTTP spec section 14.7
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7>`_).
|
|
app_iter
Returns the app_iter of the response.
|
|
body
The body of the response, as a ``str``.
|
|
body_file
A file-like object that can be used to write to the body.
|
|
cache_control
Get/set/modify the Cache-Control header (`HTTP spec section 14.9
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>`_)
|
|
cache_expires
|
|
charset
Get/set the charset (in the Content-Type)
|
|
content_disposition
Gets and sets the ``Content-Disposition`` header (`HTTP spec section
19.5.1
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1>`_).
|
|
content_encoding
Gets and sets the ``Content-Encoding`` header (`HTTP spec section
14.11
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11>`_).
|
|
content_language
Gets and sets the ``Content-Language`` header (`HTTP spec section
14.12
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.12>`_).
|
|
content_length
Gets and sets the ``Content-Length`` header (`HTTP spec section 14.17
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17>`_).
|
|
content_location
Gets and sets the ``Content-Location`` header (`HTTP spec section
14.14
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14>`_).
|
|
content_md5
Gets and sets the ``Content-MD5`` header (`HTTP spec section 14.14
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14>`_).
|
|
content_range
Gets and sets the ``Content-Range`` header (`HTTP spec section 14.16
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16>`_).
|
|
content_type
Get/set the Content-Type header (or None), *without* the charset or
any parameters.
|
|
content_type_params
A dictionary of all the parameters in the content type.
|
|
date
Gets and sets the ``Date`` header (`HTTP spec section 14.18
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.18>`_).
|
|
environ
Get/set the request environ associated with this response, if any.
|
|
etag
Gets and sets the ``ETag`` header (`HTTP spec section 14.19
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19>`_).
|
|
expires
Gets and sets the ``Expires`` header (`HTTP spec section 14.21
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21>`_).
|
|
headerlist
The list of response headers
|
|
headers
The headers in a dictionary-like object
|
|
last_modified
Gets and sets the ``Last-Modified`` header (`HTTP spec section 14.29
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29>`_).
|
|
location
Gets and sets the ``Location`` header (`HTTP spec section 14.30
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30>`_).
|
|
pragma
Gets and sets the ``Pragma`` header (`HTTP spec section 14.32
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32>`_).
|
|
request
Return the request associated with this response if any.
|
|
retry_after
Gets and sets the ``Retry-After`` header (`HTTP spec section 14.37
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.37>`_).
|
|
server
Gets and sets the ``Server`` header (`HTTP spec section 14.38
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.38>`_).
|
|
status
The status string
|
|
status_int
The status as an integer
|
|
text
Get/set the unicode value of the body (using the charset of the
Content-Type)
|
|
ubody
Deprecated alias for .text
|
|
unicode_body
Deprecated alias for .text
|
|
vary
Gets and sets the ``Vary`` header (`HTTP spec section 14.44
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44>`_).
|
|
www_authenticate
Gets and sets the ``WWW-Authenticate`` header (`HTTP spec section
14.47
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.47>`_).
|
Inherited from object :
__class__
|