error reading api with urllib

Ian Kelly ian.g.kelly at gmail.com
Wed Dec 16 18:24:54 EST 2015


On Wed, Dec 16, 2015 at 3:12 PM, John Gordon <gordon at panix.com> wrote:
> In <9aa21642-765b-4666-8c66-a6dab9928c37 at googlegroups.com> simian336 at gmail.com writes:
>
>> Bad Request
>> b''
>
>
> That probably means you aren't using one of the recognized methods
> (i.e. GET, POST, etc.)
>
> It doesn't look like you are specifying one of these methods on your
> Request object.  Try doing that.
>
> (It works in your browser because it defaults to GET automatically.)

urllib.request.Request also defaults to GET unless the request
includes data, in which case it defaults to POST. I would be more
inclined to suspect a problem with the stored procedure being called.



More information about the Python-list mailing list