bpo-36064: Clarify allowed data types for urllib.request.Request. (GH-11990)

This commit is contained in:
Julien Palard 2019-03-29 03:15:34 +01:00 committed by Carol Willing
parent 081158e3ba
commit 9e30fbac01
1 changed files with 2 additions and 2 deletions

View File

@ -192,8 +192,8 @@ The following classes are provided:
*data* must be an object specifying additional data to send to the *data* must be an object specifying additional data to send to the
server, or ``None`` if no such data is needed. Currently HTTP server, or ``None`` if no such data is needed. Currently HTTP
requests are the only ones that use *data*. The supported object requests are the only ones that use *data*. The supported object
types include bytes, file-like objects, and iterables. If no types include bytes, file-like objects, and iterables of bytes-like objects.
``Content-Length`` nor ``Transfer-Encoding`` header field If no ``Content-Length`` nor ``Transfer-Encoding`` header field
has been provided, :class:`HTTPHandler` will set these headers according has been provided, :class:`HTTPHandler` will set these headers according
to the type of *data*. ``Content-Length`` will be used to send to the type of *data*. ``Content-Length`` will be used to send
bytes objects, while ``Transfer-Encoding: chunked`` as specified in bytes objects, while ``Transfer-Encoding: chunked`` as specified in