Skip to content
Myr

better defaults

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent c0d8e8e · Browse files · 1 file+3 added−3 removed
This commit

State

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

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:requests/api.py+3 added-3 removed
88 unmodified lines
89 kwargs.setdefault('allow_redirects', True)90 return request('HEAD', url, **kwargs)919293def post(url, data='', **kwargs):93def post(url, data=None, **kwargs):94 """Sends a POST request. Returns :class:`Response` object.9596 :param url: URL for the new :class:`Request` object.97 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
2 unmodified lines
100101 return request('post', url, data=data, **kwargs)102103104def put(url, data='', **kwargs):104def put(url, data=None, **kwargs):105 """Sends a PUT request. Returns :class:`Response` object.106107 :param url: URL for the new :class:`Request` object.108 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
2 unmodified lines
111112 return request('put', url, data=data, **kwargs)113114115def patch(url, data='', **kwargs):115def patch(url, data=None, **kwargs):116 """Sends a PATCH request. Returns :class:`Response` object.117118 :param url: URL for the new :class:`Request` object.119 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.
14 unmodified lines