http.client.HTTPResponse.closed

HTTPResponse.closed Is True if the stream is closed.

http.client.HTTPResponse.getheaders()

HTTPResponse.getheaders() Return a list of (header, value) tuples.

http.client.HTTPResponse.msg

HTTPResponse.msg A http.client.HTTPMessage instance containing the response headers. http.client.HTTPMessage is a subclass of email.message.Message.

http.client.HTTPConnection.request()

HTTPConnection.request(method, url, body=None, headers={}) This will send a request to the server using the HTTP request method method and the selector url. If body is specified, the specified data is sent after the headers are finished. It may be a string, a bytes-like object, an open file object, or an iterable of bytes-like objects. If body is a string, it is encoded as ISO-8859-1, the default for HTTP. If it is a bytes-like object the bytes are sent as is. If it is a file object, the con

http.client.HTTPConnection.send()

HTTPConnection.send(data) Send data to the server. This should be used directly only after the endheaders() method has been called and before getresponse() is called.

http.client.HTTPConnection.set_debuglevel()

HTTPConnection.set_debuglevel(level) Set the debugging level. The default debug level is 0, meaning no debugging output is printed. Any value greater than 0 will cause all currently defined debug output to be printed to stdout. The debuglevel is passed to any new HTTPResponse objects that are created. New in version 3.1.

http.client.HTTPException

exception http.client.HTTPException The base class of the other exceptions in this module. It is a subclass of Exception.

http.client.HTTPConnection.set_tunnel()

HTTPConnection.set_tunnel(host, port=None, headers=None) Set the host and the port for HTTP Connect Tunnelling. This allows running the connection through a proxy server. The host and port arguments specify the endpoint of the tunneled connection (i.e. the address included in the CONNECT request, not the address of the proxy server). The headers argument should be a mapping of extra HTTP headers to send with the CONNECT request. For example, to tunnel through a HTTPS proxy server running loc

http.client.HTTPResponse

class http.client.HTTPResponse(sock, debuglevel=0, method=None, url=None) Class whose instances are returned upon successful connection. Not instantiated directly by user. Changed in version 3.4: The strict parameter was removed. HTTP 0.9 style “Simple Responses” are no longer supported.

http.client.HTTPConnection.connect()

HTTPConnection.connect() Connect to the server specified when the object was created. By default, this is called automatically when making a request if the client does not already have a connection.