Http objects have the following methods:
uri, [method="GET", body=None, headers=None, redirections=DEFAULT_MAX_REDIRECTS]) |
http
or https
. The value of uri must be an absolute URI.
The method is the HTTP method to perform, such as GET
, POST
, DELETE
, etc. There is no restriction
on the methods allowed.
The body is the entity body to be sent with the request. It is a string object.
Any extra headers that are to be sent with the request should be provided in the headers dictionary.
The maximum number of redirect to follow before raising an exception is redirections. The default is 5.
The return value is a tuple of (response, content), the first being and instance of the Response class, the second being a string that contains the response entity body.
name, password, [domain=None]) |
key, cert, domain) |
) |
True
, which is the default, safe redirects are followed, where
safe means that the client is only doing a GET
or HEAD
on the
URI to which it is being redirected. If False
then no redirects are followed.
Note that a False 'follow_redirects' takes precedence over a True 'follow_all_redirects'.
Another way of saying that is for 'follow_all_redirects' to have any affect, 'follow_redirects'
must by True.
False
, which is the default, only safe redirects are followed, where
safe means that the client is only doing a GET
or HEAD
on the
URI to which it is being redirected. If True
then all redirects are followed.
True
, which is the default, then no httplib2 exceptions will be thrown. Instead,
those error conditions will be turned into Response objects
that will be returned normally.
If False
, then exceptions will be thrown.
False
. If True
, then any etags present in the cached response
are ignored when processing the current request, i.e. httplib2 does not use
'if-match' for PUT or 'if-none-match' when GET or HEAD requests are made. This
is mainly to deal with broken servers which supply an etag, but change it capriciously.