Lines Matching refs:Response
64 __all__ = ['Response']
71 class Response(object):
73 Represents a WSGI response
78 unicode_errors = 'strict' # TODO: deprecate (why would response body have errors?)
161 """Reads a response from a file-like object (it must implement
164 It will read up to the end of the response, not the end of the
167 This reads the response as represented by ``str(resp)``; it
168 may not read every valid HTTP response properly. Responses
204 """Makes a copy of the response"""
292 The list of response headers
333 The body of the response, as a ``str``. This will read in the
354 # if body-length is zero, we assume it's a HEAD response and
370 msg = ("You cannot set Response.body to a text object "
371 "(use Response.text)")
388 """Access the body of the response as JSON"""
412 "You cannot access Response.text unless charset is set")
419 "You cannot access Response.text unless charset is set")
422 "You can only set Response.text to a unicode string "
458 msg = "You can only write str to a Response.body_file, not %s"
461 msg = ("You can only write text to Response if charset has "
485 Returns the app_iter of the response.
513 # TODO: (maybe) support response.vary += 'something'
699 Set (add) a cookie for the response.
711 :meth:`webob.response.Response.unset_cookie` method for this
803 response).
823 """Merge the cookies that were set on this response with the
826 If the `resp` is a :class:`webob.Response` object, then the
831 if isinstance(resp, Response):
860 value, updates_to=self._update_cache_control, type='response')
863 new_obj = CacheControl.parse(value, type='response')
874 value = CacheControl(value, 'response')
881 value = CacheControl.parse(value, 'response')
908 Set expiration on this request. This sets the response to
991 Generate an etag for the response object using an MD5 hash of
1107 Return a new app_iter built from the response app_iter, that
1131 def __init__(self, response):
1132 self.response = response
1133 self.write = response.write
1136 return '<body_file for %r>' % self.response
1139 lambda self: self.response.charset,
1140 doc="The encoding of the file (inherited from response.charset)"
1148 raise NotImplementedError("Response bodies cannot be closed")
1213 """An empty WSGI response.