Package openid :: Module fetchers :: Class HTTPFetcher
[frames | no frames]

Type HTTPFetcher

object --+
         |
        HTTPFetcher


This class is the interface for openid HTTP fetchers. This interface is only important if you need to write a new fetcher for some reason.
Method Summary
HTTPResponse fetch(self, url, body, headers)
This performs an HTTP POST or GET, following redirects along the way.
Inherited from object: __init__, __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Method Details

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

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
           (type={str:str})
Returns:
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.
           (type=HTTPResponse)
Raises:
Exception - Different implementations will raise different errors based on the underlying HTTP library.

Generated by Epydoc 2.1 on Fri Jun 27 15:48:23 2008 http://epydoc.sf.net