Skip to content

Instantly share code, notes, and snippets.

Jarrod nevros

Block or report user

Report or block nevros

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.