Skip to content

Commit b7c2058

Browse files
committed
Reword the note on unserialized data
1 parent c0a1276 commit b7c2058

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎Doc/library/urllib.request.rst‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,8 @@ The following classes are provided:
252252
bytes objects, while ``Transfer-Encoding: chunked`` as specified in
253253
:rfc:`7230`, Section 3.3.1 will be used to send files and other iterables.
254254

255-
*data* is not serialized before it is sent: the elements of an iterable
256-
are sent as is, so a :class:`dict` yields only its keys. Structured
257-
data such as a JSON object must be encoded to bytes first, for example
258-
with :func:`json.dumps`.
255+
*data* is sent as is without serialization. An iterable is sent element
256+
by element so passing a :class:`dict`, for example, sends only its keys.
259257

260258
For an HTTP POST request method, *data* should be a buffer in the
261259
standard :mimetype:`application/x-www-form-urlencoded` format. The

0 commit comments

Comments
 (0)