internet application programming table code continued description symbolic constant client error ( xx bad request unauthorized forbidden not found bad_request unauthorized forbidden not_found server error ( xx internal server error not implemented bad gateway service unavailable internal_server_error not_implemented bad_gateway service_unavailable the headers that appear in both requests and responses are encoded in format widely known as rfc- then general form of each header is headernamedataalthough further details can be found in the rfc it is almost never necessary to parse these headers as python usually does it for you when applicable http client (httplibthe http client module provides low-level support for the client side of http in python this module is called httplib use functions in the urllib package instead the module supports both http/ and http/ and additionally allows connections via ssl if python is built with openssl support normallyyou do not use this package directlyinsteadyou should consider using the urllib package howeverbecause http is such an important protocolyou may encounter situations where you need to work with the low-level details in way that urllib cannot easily address--for exampleif you wanted to send requests with commands other than get or post for more details about httpconsult rfc (http/ and rfc (http/ the following classes can be used to establish an http connection with serverhttpconnection(host [,port]creates an http connection host is the host nameand port is the remote port number the default port is returns an httpconnection instance httpsconnection(host [port [key_file=kfile [cert_file=cfile ]]]creates an http connection but uses secure socket the default port is key_file and cert_file are optional keyword arguments that specify client pemformatted private-key and certificate chain filesshould they be needed for client authentication howeverno validation of server certificates is performed returns an httpsconnection instance lib fl ff