Skip to content
Myr

Merge branch 'develop' of https://github.com/jbrendel/requests into develop

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

Conflicts: AUTHORS requests/__init__.py

authored by Kenneth Reitz · committed by Kenneth Reitz · parents f4296ba, 73ba48b · Browse files · 5 files+29 added−5 removed
This commit

State

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

Diff stats

5 files+29 added−5 removed

  • other:+29 added−5 removed

5 files+29 added−5 removed

modified:requests/__init__.py+1 added-1 removed
22 unmodified lines
232425from . import utils26from .models import Request, Response27from .api import request, get, head, post, patch, put, delete27from .api import request, get, head, post, patch, put, delete, options28from .sessions import session, Session29from .status_codes import codes30from .exceptions import (31 RequestException, Timeout, URLRequired,
2 unmodified lines
modified:requests/api.py+12 added-1 removed
11 unmodified lines
12"""1314from .sessions import session1516__all__ = ('request', 'get', 'head', 'post', 'patch', 'put', 'delete')16__all__ = ('request', 'get', 'options', 'head', 'post', 'patch', 'put', 'delete')171819def request(method, url,20 params=None,
46 unmodified lines
67 kwargs.setdefault('allow_redirects', True)68 return request('GET', url, **kwargs)697071def options(url, **kwargs):72 """Sends a OPTIONS request. Returns :class:`Response` object.7374 :param url: URL for the new :class:`Request` object.75 :param **kwargs: Optional arguments that ``request`` takes.76 """7778 kwargs.setdefault('allow_redirects', True)79 return request('OPTIONS', url, **kwargs)808182def head(url, **kwargs):83 """Sends a HEAD request. Returns :class:`Response` object.8485 :param url: URL for the new :class:`Request` object.
48 unmodified lines
modified:requests/async.py+2 added-1 removed
22 unmodified lines
232425__all__ = (26 'map',27 'get', 'head', 'post', 'put', 'patch', 'delete', 'request'27 'get', 'options', 'head', 'post', 'put', 'patch', 'delete', 'request'28)293031def patched(f):
21 unmodified lines
535455# Patched requests.api functions.56get = patched(api.get)57options = patched(api.options)58head = patched(api.head)59post = patched(api.post)60put = patched(api.put)61patch = patched(api.patch)
22 unmodified lines
modified:requests/sessions.py+12 added-1 removed
197 unmodified lines
198 kwargs.setdefault('allow_redirects', True)199 return self.request('GET', url, **kwargs)200201202 def options(self, url, **kwargs):203 """Sends a OPTIONS request. Returns :class:`Response` object.204205 :param url: URL for the new :class:`Request` object.206 :param **kwargs: Optional arguments that ``request`` takes.207 """208209 kwargs.setdefault('allow_redirects', True)210 return self.request('OPTIONS', url, **kwargs)211212213 def head(self, url, **kwargs):214 """Sends a HEAD request. Returns :class:`Response` object.215216 :param url: URL for the new :class:`Request` object.
50 unmodified lines
267268def session(**kwargs):269 """Returns a :class:`Session` for context-management."""270260 return Session(**kwargs)271 return Session(**kwargs)
modified:AUTHORS+2 added-1 removed
48 unmodified lines
49- Daniel Hengeveld50- Dan Head51- Bruno Renié52- David Fischer53- Joseph McCullough53- Joseph McCullough54- Juergen Brendel