error reading api with urllib

John Gordon gordon at panix.com
Wed Dec 16 17:12:02 EST 2015


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.)

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list