.. class:: HTTPResponse(sock[, debuglevel=0][, strict=0])
- Class whose instances are returned upon successful connection. Not instantiated
- directly by user.
+ Class whose instances are returned upon successful connection. Not
+ instantiated directly by user.
The following exceptions are raised as appropriate:
HTTPResponse Objects
--------------------
-:class:`HTTPResponse` instances have the following methods and attributes:
+An :class:`HTTPResponse` instance wraps the HTTP response from the
+server. It provides access to the request headers and the entity
+body. The response is an iterable object and can be used in a with
+statement.
.. method:: HTTPResponse.read([amt])
.. attribute:: HTTPResponse.msg
- An :class:`email.message.Message` instance containing the response headers.
+ A :class:`http.client.HTTPMessage` instance containing the response
+ headers. :class:`http.client.HTTPMessage` is a subclass of
+ :class:`email.message.Message`.
.. attribute:: HTTPResponse.version
Reason phrase returned by server.
+.. attribute:: HTTPResponse.debuglevel
+
+ A debugging hook. If `debuglevel` is greater than zero, messages
+ will be printed to stdout as the response is read and parsed.
+
+
Examples
--------
>>> data = response.read()
>>> conn.close()
+
+.. _httpmessage-objects:
+
+HTTPMessage Objects
+-------------------
+
+An :class:`http.client.HTTPMessage` instance holds the headers from an
+HTTP response. It is implemented using the
+:class:`email.message.Message' class.
+
+XXX Define the methods that clients can depend upon between versions.
\ No newline at end of file