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

Class Urllib2Fetcher

source code

 object --+    
          |    
HTTPFetcher --+
              |
             Urllib2Fetcher

An HTTPFetcher that uses urllib2.

Instance Methods [hide private]
HTTPResponse
fetch(self, url, body=None, headers=None)
This performs an HTTP POST or GET, following redirects along the way.
source code
 
_makeResponse(self, urllib2_response) source code

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

Static Methods [hide private]
 
urlopen(url, data=None, timeout=<object object at 0x7fd7edf471a0>) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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)