From: Kenneth Reitz Date: Thu, 18 Aug 2011 00:13:44 +0000 (-0400) Subject: Allow any method, if so inclined X-Git-Tag: v0.6.1~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96e7a60b8d8a930d3257b87e3159b5abbbf385d5;p=services%2Fpython-requests.git Allow any method, if so inclined #124 --- diff --git a/AUTHORS b/AUTHORS index dd1b310..5bd399a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -35,4 +35,5 @@ Patches and Suggestions - Jens Diemer - Alex <@alopatin> - Tom Hogans -- Armin Ronacher \ No newline at end of file +- Armin Ronacher +- Shrikant Sharat Kandula \ No newline at end of file diff --git a/requests/models.py b/requests/models.py index d6b058f..0b22f71 100644 --- a/requests/models.py +++ b/requests/models.py @@ -32,8 +32,6 @@ class Request(object): Requests. Recommended interface is with the Requests functions. """ - _METHODS = ('GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH') - def __init__(self, url=None, headers=dict(), files=None, method=None, data=dict(), params=dict(), auth=None, cookiejar=None, timeout=None, redirect=False, @@ -116,14 +114,6 @@ class Request(object): return '' % (self.method) - def __setattr__(self, name, value): - if (name == 'method') and (value): - if not value in self._METHODS: - raise InvalidMethod() - - object.__setattr__(self, name, value) - - def _checks(self): """Deterministic checks for consistency."""