|
__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 x.__class__.__doc__ 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. |
|
|
|
_add_cookie(self,
cookie) |
|
|
|
|
|
|
|
_app_iter__set(self,
value) |
|
|
|
|
|
_body__get(self)
The body of the response, as a ``str``. |
|
|
|
|
|
|
|
_body_file__get(self)
A file-like object that can be used to write to the body. |
|
|
|
_cache_control__del(self) |
|
|
|
_cache_control__get(self)
Get/set/modify the Cache-Control header (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,
value) |
|
|
|
|
|
_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) |
|
|
|
|
|
_unicode_body__get(self)
Get/set the unicode value of the body (using the charset of the
Content-Type) |
|
|
|
_unicode_body__set(self,
value) |
|
|
|
_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 ' )
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=None,
httponly=False,
version=None,
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__
|
|
_cache_control_obj = None
hash(x)
|
|
_safe_methods = ( ' GET ' , ' HEAD ' )
|
|
accept_ranges = <Proxy for header Accept-Ranges>
|
|
age = <Converted <Proxy for header Age> int>
|
|
allow = <Converted <Proxy for header Allow> list>
|
|
cache_expires = set_via_call(<function _cache_expires at 0x9a2...
|
|
content_disposition = <Proxy for header Content-Disposition>
|
|
content_encoding = <Proxy for header Content-Encoding>
|
|
content_language = <Converted <Proxy for header Content-Langua...
|
|
content_length = <Converted <Proxy for header Content-Length> ...
|
|
content_location = <Proxy for header Content-Location>
|
|
content_md5 = <Proxy for header Content-MD5>
|
|
content_range = <Converted <Proxy for header Content-Range> Co...
|
|
date = <Converted <Proxy for header Date> HTTP date>
|
|
default_charset = ' UTF-8 '
|
|
default_conditional_response = False
|
|
default_content_type = ' text/html '
|
|
etag = <Converted <Proxy for header ETag> Entity tag>
|
|
expires = <Converted <Proxy for header Expires> HTTP date>
|
|
last_modified = <Converted <Proxy for header Last-Modified> HT...
|
|
location = <Proxy for header Location>
|
|
pragma = <Proxy for header Pragma>
|
|
retry_after = <Converted <Proxy for header Retry-After> HTTP d...
|
|
server = <Proxy for header Server>
|
|
status_code = <Deprecated attribute status_code: <property obj...
|
|
unicode_errors = ' strict '
|
|
vary = <Converted <Proxy for header Vary> list>
|
|
www_authenticate = <Converted <Proxy for header WWW-Authentica...
|