From bed00dea090ba51e33981e0b6784f23253d4f74a Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Sat, 5 Feb 2011 00:00:46 -0600 Subject: [PATCH] Add docstring to _fetch_http --- simplemediawiki.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simplemediawiki.py b/simplemediawiki.py index f039c5a..2934ab9 100644 --- a/simplemediawiki.py +++ b/simplemediawiki.py @@ -74,6 +74,10 @@ class MediaWiki(): self._opener.addheaders = [('User-agent', user_agent)] def _fetch_http(self, url, params): + """ + Standard HTTP request handler for this class with gzip and cookie + support. + """ request = urllib2.Request(url, urllib.urlencode(params)) request.add_header('Accept-encoding', 'gzip') response = self._opener.open(request) -- 2.39.5