Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/library/urllib.request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ The following classes are provided:
bytes objects, while ``Transfer-Encoding: chunked`` as specified in
:rfc:`7230`, Section 3.3.1 will be used to send files and other iterables.

*data* is not serialized before it is sent: the elements of an iterable
are sent as is, so a :class:`dict` yields only its keys. Structured
data such as a JSON object must be encoded to bytes first, for example
with :func:`json.dumps`.

For an HTTP POST request method, *data* should be a buffer in the
standard :mimetype:`application/x-www-form-urlencoded` format. The
:func:`urllib.parse.urlencode` function takes a mapping or sequence
Expand Down
Loading