This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti, martin.panter
Date 2015-10-19.10:44:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1445251489.21.0.752311110824.issue25439@psf.upfronthosting.co.za>
In-reply-to
Content
> For the request data, the question is what types do we currently support?

This is what I was wondering as well.  The doc says "data must be a bytes object specifying additional data to send to the server, or None if no such data is needed."[0]
However one of the error messages says "POST data should be bytes or an iterable of bytes." and "Content-Length should be specified for iterable data" so iterables of bytes also seem to be supported.
One option is to simply reject str and dict (or mappings in general), since these seem to me the two most likely errors (the first in case the user forgot to encode the output of urlencode(), the second in case the user forgot urlencode() altogether and passed a dict).

[0]: https://docs.python.org/3/library/urllib.request.html#urllib.request.Request
History
Date User Action Args
2015-10-19 10:44:49ezio.melottisetrecipients: + ezio.melotti, martin.panter
2015-10-19 10:44:49ezio.melottisetmessageid: <1445251489.21.0.752311110824.issue25439@psf.upfronthosting.co.za>
2015-10-19 10:44:49ezio.melottilinkissue25439 messages
2015-10-19 10:44:48ezio.melotticreate