http.client.HTTPConnection.putheader()

HTTPConnection.putheader(header, argument[, ...]) Send an RFC 822-style header to the server. It sends a line to the server consisting of the header, a colon and a space, and the first argument. If more arguments are given, continuation lines are sent, each consisting of a tab and an argument.

http.client.HTTPConnection.getresponse()

HTTPConnection.getresponse() Should be called after a request is sent to get the response from the server. Returns an HTTPResponse instance. Note Note that you must have read the whole response before you can send a new request to the server. Changed in version 3.5: If a ConnectionError or subclass is raised, the HTTPConnection object will be ready to reconnect when a new request is sent.

http.client.HTTPConnection.endheaders()

HTTPConnection.endheaders(message_body=None) Send a blank line to the server, signalling the end of the headers. The optional message_body argument can be used to pass a message body associated with the request. The message body will be sent in the same packet as the message headers if it is string, otherwise it is sent in a separate packet.

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.

http.client.HTTPConnection.close()

HTTPConnection.close() Close the connection to the server.

http.client.HTTPConnection

class http.client.HTTPConnection(host, port=None, [timeout, ]source_address=None) An HTTPConnection instance represents one transaction with an HTTP server. It should be instantiated passing it a host and optional port number. If no port number is passed, the port is extracted from the host string if it has the form host:port, else the default HTTP port (80) is used. If the optional timeout parameter is given, blocking operations (like connection attempts) will timeout after that many second

http.client.CannotSendRequest

exception http.client.CannotSendRequest A subclass of ImproperConnectionState.

http.client.CannotSendHeader

exception http.client.CannotSendHeader A subclass of ImproperConnectionState.

http.client.BadStatusLine

exception http.client.BadStatusLine A subclass of HTTPException. Raised if a server responds with a HTTP status code that we don’t understand.

html.unescape()

html.unescape(s) Convert all named and numeric character references (e.g. >, >, &x3e;) in the string s to the corresponding unicode characters. This function uses the rules defined by the HTML 5 standard for both valid and invalid character references, and the list of HTML 5 named character references. New in version 3.4.