Skip to content

Instantly share code, notes, and snippets.

Jarrod nevros

View GitHub Profile
logic /
Created May 17, 2012
Adding an HTTP method to urllib2.Request.
import urllib2
class MethodRequest(urllib2.Request):
def __init__(self, *args, **kwargs):
if 'method' in kwargs:
self._method = kwargs['method']
del kwargs['method']
self._method = None
return urllib2.Request.__init__(self, *args, **kwargs)
You can’t perform that action at this time.