Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Response Objects

The fetch() function returns an object containing the details of the response returned by the URL's server. This object has several attributes:

content
The body content of the response.
content_was_truncated
True if the allow_truncated parameter to fetch() was True and the response exceeded the maximum response size. In this case, the content attribute contains the truncated response.
status_code
The HTTP status code.
headers
The HTTP response headers, as a mapping of names to values. If there are multiple headers with the same name, their values will be joined into a single comma-separated string. If the values already contained commas (for example, Set-Cookie headers), you may want to use header_msg.getheaders( header_name ) to retrieve a list of values instead.
header_msg
An instance of httplib.HTTPMessage containing the response headers. If there may be multiple headers with the same name (for example, Set-Cookie headers), call header_msg.getheaders( header_name ) to retrieve the values as a list.
final_url
The actual URL whose request returned this response. Only present if the fetch followed HTTP redirects. Not present if the retrieved URL matches the requested URL.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.