Merge pull request #3900 from lutzhorn/master
Before adoption: this commit came in with the history the project adopted, so no landing records it.
fixed #3894 by mentioning form-encoding of dict
authored by Cory Benfield · committed by GitHub · parents 2aaf6ac, 3d22f9f · Browse files · 1 file·+4 added−4 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+4 added−4 removed
- other:+4 added−4 removed
Provenance
- Commit
3f3df8b- Tree
a5f1ad9- Author
Cory Benfield <lukasaoz@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
2aaf6ac- Parent 2
3d22f9f
1 file changed+4 added−4 removed
modified:requests/api.py+4 added-4 removed
17 unmodified lines18 19 :param method: method for the new :class:`Request` object.20 :param url: URL for the new :class:`Request` object.21 :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`.22- :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.22+ :param data: (optional) Dictionary (will be form-encoded), bytes, or file-like object to send in the body of the :class:`Request`.23 :param json: (optional) json data to send in the body of the :class:`Request`.24 :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.25 :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.26 :param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.72 unmodified lines99 def post(url, data=None, json=None, **kwargs):100 """Sends a POST request.101 102 :param url: URL for the new :class:`Request` object.103- :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.103+ :param data: (optional) Dictionary (will be form-encoded), bytes, or file-like object to send in the body of the :class:`Request`.104 :param json: (optional) json data to send in the body of the :class:`Request`.105 :param \*\*kwargs: Optional arguments that ``request`` takes.106 :return: :class:`Response <Response>` object107 :rtype: requests.Response5 unmodified lines113 def put(url, data=None, **kwargs):114 """Sends a PUT request.115 116 :param url: URL for the new :class:`Request` object.117- :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.117+ :param data: (optional) Dictionary (will be form-encoded), bytes, or file-like object to send in the body of the :class:`Request`.118 :param json: (optional) json data to send in the body of the :class:`Request`.119 :param \*\*kwargs: Optional arguments that ``request`` takes.120 :return: :class:`Response <Response>` object121 :rtype: requests.Response5 unmodified lines127 def patch(url, data=None, **kwargs):128 """Sends a PATCH request.129 130 :param url: URL for the new :class:`Request` object.131- :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.131+ :param data: (optional) Dictionary (will be form-encoded), bytes, or file-like object to send in the body of the :class:`Request`.132 :param json: (optional) json data to send in the body of the :class:`Request`.133 :param \*\*kwargs: Optional arguments that ``request`` takes.134 :return: :class:`Response <Response>` object135 :rtype: requests.Response15 unmodified lines