Skip to content
Myr

Updated API docs for 'data' param in sessions module to indicate that file-like object is also supported.

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

authored by Hans Lellelid · committed by Hans Lellelid · parent dd27178 · 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/sessions.py+3 added-3 removed
314 unmodified lines
315 def post(self, url, data=None, **kwargs):316 """Sends a POST request. Returns :class:`Response` object.317318 :param url: URL for the new :class:`Request` object.319 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.319 :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.320 :param \*\*kwargs: Optional arguments that ``request`` takes.321 """322323 return self.request('POST', url, data=data, **kwargs)
1 unmodified line
325 def put(self, url, data=None, **kwargs):326 """Sends a PUT request. Returns :class:`Response` object.327328 :param url: URL for the new :class:`Request` object.329 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.329 :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.330 :param \*\*kwargs: Optional arguments that ``request`` takes.331 """332333 return self.request('PUT', url, data=data, **kwargs)
1 unmodified line
335 def patch(self, url, data=None, **kwargs):336 """Sends a PATCH request. Returns :class:`Response` object.337338 :param url: URL for the new :class:`Request` object.339 :param data: (optional) Dictionary or bytes to send in the body of the :class:`Request`.339 :param data: (optional) Dictionary, bytes, or file-like object to send in the body of the :class:`Request`.340 :param \*\*kwargs: Optional arguments that ``request`` takes.341 """342343 return self.request('PATCH', url, data=data, **kwargs)
47 unmodified lines