Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e30fba

Browse files
JulienPalardwillingc
authored andcommitted
bpo-36064: Clarify allowed data types for urllib.request.Request. (GH-11990)
1 parent 081158e commit 9e30fba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/urllib.request.rst

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

0 commit comments

Comments
 (0)