Skip to content
Myr

default post data to empty byte string

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

Refs #45

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 9b2d738 · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/api.py+2 added-2 removed
79 unmodified lines
8081 return request('HEAD', url, params=params, headers=headers, cookies=cookies, auth=auth, timeout=timeout)828384def post(url, data=None, headers=None, files=None, cookies=None, auth=None, timeout=None, allow_redirects=False):84def post(url, data='', headers=None, files=None, cookies=None, auth=None, timeout=None, allow_redirects=False):85 """Sends a POST request. Returns :class:`Response` object.8687 :param url: URL for the new :class:`Request` object.88 :param data: (optional) Dictionary of POST data to send with the :class:`Request`.
8 unmodified lines
97 return request('POST', url, data=data, headers=headers, files=files, cookies=cookies, auth=auth,98 timeout=timeout, allow_redirects=allow_redirects)99100101def put(url, data=None, headers=None, files=None, cookies=None, auth=None, timeout=None, allow_redirects=False):101def put(url, data='', headers=None, files=None, cookies=None, auth=None, timeout=None, allow_redirects=False):102 """Sends a PUT request. Returns :class:`Response` object.103104 :param url: URL for the new :class:`Request` object.105 :param params: (optional) Bytes of PUT Data to send with the :class:`Request`.
26 unmodified lines