Staging: this is not the live site, pydocs.org.
Internet Protocols and Support
Class whose instances are returned upon successful connection. Not instantiated directly by user.
Changed in 3.4
- 3.4: The strict parameter was removed. HTTP 0.9 style “Simple Responses” are no longer supported.
Members of HTTPResponse
c
- closed
- Is True if the stream is closed.
f
- fileno
- Return underlying file descriptor if one exists.
g
- getcode
- Return the HTTP status code that was sent with the response, or None if the URL is not an HTTP URL.
- getheader
- Returns the value of the header matching *name*.
- geturl
- Return the real URL of the page.
h
- headers
- Headers of the response in the form of an email.message.EmailMessage instance.
i
- info
- Returns an instance of the class mimetools.Message containing meta-information associated with the URL.
m
- msg
- A http.client.HTTPMessage instance containing the response headers.
r
- read
- Read and return the response body, or up to the next amt bytes.
- readinto
- Read up to len(b) bytes into bytearray b and return the number of bytes read.
- reason
- Reason phrase returned by server.
s
- status
- Status code returned by server.
u
- url
- URL of the resource retrieved, commonly used to determine if a redirect was followed.
v
- version
- HTTP protocol version used by server.