mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
[Bug #1441864] Clarify description of 'data' argument
This commit is contained in:
parent
794c89b678
commit
27ca711d20
1 changed files with 7 additions and 5 deletions
|
@ -18,11 +18,13 @@ The \module{urllib2} module defines the following functions:
|
||||||
Open the URL \var{url}, which can be either a string or a \class{Request}
|
Open the URL \var{url}, which can be either a string or a \class{Request}
|
||||||
object.
|
object.
|
||||||
|
|
||||||
\var{data} should be a string, which specifies additional data to
|
\var{data} should be a string, which specifies additional data to send
|
||||||
send to the server. In HTTP requests, which are the only ones that
|
to the server. Currently HTTP requests are the only ones that use
|
||||||
support \var{data}, it should be a buffer in the format of
|
\var{data}. For HTTP, the request will be a POST instead of a GET
|
||||||
\mimetype{application/x-www-form-urlencoded}, for example one returned
|
when the \var{data} parameter is provided. \var{data} should be a
|
||||||
from \function{urllib.urlencode()}.
|
buffer in the standard \mimetype{application/x-www-form-urlencoded} format.
|
||||||
|
The \function{urllib.urlencode()} function takes a mapping or
|
||||||
|
sequence of 2-tuples and returns a string in this format.
|
||||||
|
|
||||||
This function returns a file-like object with two additional methods:
|
This function returns a file-like object with two additional methods:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue