Package openid :: Module fetchers :: Class HTTPLib2Fetcher
[hide private]
[frames] | no frames]

Class HTTPLib2Fetcher

source code

 object --+    
          |    
HTTPFetcher --+
              |
             HTTPLib2Fetcher

A fetcher that uses httplib2 for performing HTTP requests. This implementation supports HTTP caching.


See Also: http://bitworking.org/projects/httplib2/

Instance Methods [hide private]
 
__init__(self, cache=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
HTTPResponse
fetch(self, url, body=None, headers=None)
Perform an HTTP request
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cache=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • cache - An object suitable for use as an httplib2 cache. If a string is passed, it is assumed to be a directory name.
Overrides: object.__init__

fetch(self, url, body=None, headers=None)

source code 

Perform an HTTP request

Parameters:
  • headers - HTTP headers to include with the request
Returns: HTTPResponse
An object representing the server's HTTP response. If there are network or protocol errors, an exception will be raised. HTTP error responses, like 404 or 500, do not cause exceptions.
Raises:
  • Exception - Any exception that can be raised by httplib2
Overrides: HTTPFetcher.fetch

See Also: HTTPFetcher.fetch