diff options
author | Vlastimil Zíma <vlastimil.zima@nic.cz> | 2018-05-09 13:24:16 +0200 |
---|---|---|
committer | Vlastimil Zíma <vlastimil.zima@nic.cz> | 2018-05-11 13:39:31 +0200 |
commit | 2f57983ab8ea63f4438acd048cce50cce1e142d6 (patch) | |
tree | b96d2e232e500dd97295493f73197cc0384c15fb /openid/fetchers.py | |
parent | 61e6d6a135600db480ed14ec8f6fbb8676668dc3 (diff) | |
download | openid-2f57983ab8ea63f4438acd048cce50cce1e142d6.tar.gz |
Transform remaining API to text strings
Diffstat (limited to 'openid/fetchers.py')
-rw-r--r-- | openid/fetchers.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/openid/fetchers.py b/openid/fetchers.py index 2328fc9..3bcb9d7 100644 --- a/openid/fetchers.py +++ b/openid/fetchers.py @@ -1,11 +1,5 @@ -# -*- test-case-name: openid.test.test_fetchers -*- -""" -This module contains the HTTP fetcher interface and several implementations. -""" - -__all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse', - 'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', - 'HTTPError'] +"""This module contains the HTTP fetcher interface and several implementations.""" +from __future__ import unicode_literals import cStringIO import sys @@ -15,6 +9,10 @@ import urllib2 import openid import openid.urinorm +__all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse', + 'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', + 'HTTPError'] + # Try to import httplib2 for caching support # http://bitworking.org/projects/httplib2/ try: @@ -121,7 +119,10 @@ def usingCurl(): class HTTPResponse(object): - """XXX document attributes""" + """XXX document attributes + + @type body: six.binary_type + """ headers = None status = None body = None @@ -154,7 +155,7 @@ class HTTPFetcher(object): @param headers: HTTP headers to include with the request - @type headers: {str:str} + @type headers: Dict[six.text_type, six.text_type] @return: An object representing the server's HTTP response. If there are network or protocol errors, an exception will be |