Connect to the server given by host and port. See the
intro for the default port. This should be called directly only if
the instance was instantiated without passing a host.
This should be the first call after the connection to the server has
been made. It sends a line to the server consisting of the
request string, the selector string, and the HTTP version
(HTTP/1.0).
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.
Complete the request by shutting down the sending end of the socket,
read the reply from the server, and return a triple
(replycode, message, headers). Here,
replycode is the integer reply code from the request (e.g.,
200 if the request was handled properly); message is the
message string corresponding to the reply code; and headers is
an instance of the class mimetools.Message containing the
headers received from the server. See the description of the
mimetools module.