internet application programming read([size]reads up to size bytes from the server if size is omittedall the data for this request is returned getheader(name [,default]gets response header name is the name of the header default is the default value to return if the header is not found getheaders(returns list of (headervaluetuples an httpresponse instance also has the following attributesr version http version used by the server status http status code returned by the server reason http error message returned by the server length number of bytes left in the response exceptions the following exceptions may be raised in the course of handling http connectionsexception description httpexception notconnected invalidurl unknownprotocol unknowntransferencoding unimplementedfilemode incompleteread badstatusline base class of all http-related errors request was made but not connected bad url or port number given unknown http protocol number unknown transfer encoding unimplemented file mode incomplete data received unknown status code received the following exceptions are related to the state of http/ connections because http/ allows multiple requests/responses to be sent over single connectionextra rules are imposed as to when requests can be sent and responses received performing operations in the wrong order will generate an exception exception description improperconnectionstate cannotsendrequest cannotsendheader responsenotready base class of all http-connection state errors can' send request can' send headers can' read response lib fl ff