This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
class MethodRequest(urllib2.Request): | |
def __init__(self, *args, **kwargs): | |
if 'method' in kwargs: | |
self._method = kwargs['method'] | |
del kwargs['method'] | |
else: | |
self._method = None | |
return urllib2.Request.__init__(self, *args, **kwargs) |