an instancehof httpconnection or httpsconnection supports the following methodsh connect(initializes the connection to the host and port given to httpconnection(or httpsconnection(other methods call this automatically if connection hasn' been made yet close(closes the connection send(bytessends byte stringbytesto the server direct use of this function is discouraged because it may break the underlying response/request protocol it' most commonly used to send data to the server after endheaders(has been called putrequest(methodselector [skip_host [skip_accept_encoding]]sends request to the server method is the http methodsuch as 'getor 'postselector specifies the object to be returnedsuch as '/index htmlthe skip_host and skip_accept_encoding parameters are flags that disable the sending of hostand accept-encodingheaders in the http request by defaultboth of these arguments are false because the http/ protocol allows multiple requests to be sent over single connectiona cannotsendrequest exception may be raised if the connection is in state that prohibits new requests from being issued putheader(headervaluesends an rfc- -style header to the server it sends line to the serverconsisting of the headera colon and spaceand the value additional arguments are encoded as continuation lines in the header raises cannotsendheader exception if is not in state that allows headers to be sent endheaders(sends blank line to the serverindicating the end of the header lines request(methodurl [body [headers]]sends complete http request to the server method and url have the same meaning as for putrequest(body is an optional string containing data to upload to the server after the request has been sent if body is suppliedthe context-lengthheader will automatically be set to an appropriate value headers is dictionary containing header:value pairs to be given to the putheader(method getresponse(gets response from the server and returns an httpresponse instance that can be used to read data raises responsenotready exception if is not in state where response would be received an httpresponse instanceras returned by the getresponse(methodsupports the following methodsf lib fl ff