Allow any method, if so inclined

#124
This commit is contained in:
Kenneth Reitz
2011-08-17 20:13:44 -04:00
parent 007963afde
commit 96e7a60b8d
2 changed files with 2 additions and 11 deletions
+2 -1
View File
@@ -35,4 +35,5 @@ Patches and Suggestions
- Jens Diemer
- Alex <@alopatin>
- Tom Hogans <tomhsx@gmail.com>
- Armin Ronacher
- Armin Ronacher
- Shrikant Sharat Kandula
-10
View File
@@ -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 '<Request [%s]>' % (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."""