diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 7a0ccfd024beb3..2ba3f1f7afd1f9 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -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