projects
/
python-simplemediawiki.debian
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e85fd3
)
Add docstring to _fetch_http
author
Ian Weller
<ian@ianweller.org>
Sat, 5 Feb 2011 06:00:46 +0000
(
00:00
-0600)
committer
Ian Weller
<ian@ianweller.org>
Sat, 5 Feb 2011 06:00:46 +0000
(
00:00
-0600)
simplemediawiki.py
patch
|
blob
|
history
diff --git
a/simplemediawiki.py
b/simplemediawiki.py
index f039c5ad95b22092efc8592b5cca2d0bb4668daa..2934ab9d96d071ad89c297dc4ac1b24a98ed706f 100644
(file)
--- 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)
Benjamin Mako Hill
||
Want to submit a patch?