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

Class CurlHTTPFetcher

source code

 object --+    
          |    
HTTPFetcher --+
              |
             CurlHTTPFetcher

An HTTPFetcher that uses pycurl for fetching. See http://pycurl.sourceforge.net/.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_parseHeaders(self, header_file) source code
 
_checkURL(self, url) source code
HTTPResponse
fetch(self, url, body=None, headers=None)
This performs an HTTP POST or GET, following redirects along the way.
source code

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

Class Variables [hide private]
  ALLOWED_TIME = 20
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

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

source code 

This performs an HTTP POST or GET, following redirects along the way. If a body is specified, then the request will be a POST. Otherwise, it will be a GET.

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 - Different implementations will raise different errors based on the underlying HTTP library.
Overrides: HTTPFetcher.fetch
(inherited documentation)