Skip to content
Myr

Allow any method, if so inclined

Before adoption: this commit came in with the history the project adopted, so no landing records it.

#124

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 007963a · Browse files · 2 files+2 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−11 removed

  • other:+2 added−11 removed

2 files+2 added−11 removed

modified:requests/models.py-10 removed
30 unmodified lines
31 """The :class:`Request <models.Request>` object. It carries out all functionality of32 Requests. Recommended interface is with the Requests functions.33 """3435 _METHODS = ('GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH')3635 def __init__(self,36 url=None, headers=dict(), files=None, method=None, data=dict(),37 params=dict(), auth=None, cookiejar=None, timeout=None, redirect=False,38 allow_redirects=False, proxies=None):
74 unmodified lines
113 def __repr__(self):114 return '<Request [%s]>' % (self.method)115116119 def __setattr__(self, name, value):120 if (name == 'method') and (value):121 if not value in self._METHODS:122 raise InvalidMethod()123124 object.__setattr__(self, name, value)125126117 def _checks(self):118 """Deterministic checks for consistency."""119120 if not self.url:
480 unmodified lines
modified:AUTHORS+2 added-1 removed
33 unmodified lines
34- Jeremy Selier35- Jens Diemer36- Alex <@alopatin>37- Tom Hogans <tomhsx@gmail.com>38- Armin Ronacher38- Armin Ronacher39- Shrikant Sharat Kandula