From 13db806861188ae15a5fb23bd39610fdb0aba4f2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 20 Aug 2011 20:04:11 -0400 Subject: [PATCH] docstringin' it up --- requests/models.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/requests/models.py b/requests/models.py index caf809c..568ee5a 100644 --- a/requests/models.py +++ b/requests/models.py @@ -393,31 +393,46 @@ class Response(object): """ def __init__(self): - #: Raw content of the response, in bytes. + #: Content of the response, in bytes or unicode (if available). #: If ``content-encoding`` of response was set to ``gzip``, the #: response data will be automatically deflated. - self._content = None + self.content = None + + # Hack for Sphinx. + del self.content + #: Integer Code of responded HTTP Status. self.status_code = None #: Case-insensitive Dictionary of Response Headers. #: For example, ``headers['content-encoding']`` will return the #: value of a ``'Content-Encoding'`` response header. self.headers = CaseInsensitiveDict() + + #: File-like object representation of response (for advanced usage). + self.fo = None + #: Final URL location of Response. self.url = None + #: True if no :attr:`error` occured. self.ok = False + #: Resulting :class:`HTTPError` of request, if one occured. self.error = None + #: A list of :class:`Response ` objects from #: the history of the Request. Any redirect responses will end #: up here. self.history = [] + #: The Request that created the Response. self.request = None + #: A dictionary of Cookies the server sent back. self.cookies = None + self._content = None + def __repr__(self): return '' % (self.status_code) -- 2.7.4