Returns an instance
r of class
HTTPResponse, which represents the response
received from the HTTP server. Call after method
request has returned. Instance
r supplies the following attributes and
Returns the contents of header
defaultif no such header exists.
An instance of class
mimetools, covered in Chapter 21. You can use
.msgto access the response’s headers and body.
Returns a string that is the body of the server’s response.
The string that the server gave as the reason for errors or anomalies. If the request was successful,
.reasoncould, for example, be '
An integer, the status code that the server returned. If the request was successful,
.statusshould be between
299according to the HTTP standards. Values between
599are typical error codes, again according to HTTP standards. For example,
404is the error code that a server sends when the page you request cannot be found.
10if the server supports only HTTP 1.0,
11if the server supports HTTP 1.1.