Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #100538

Re: error reading api with urllib

Path csiph.com!au2pb.net!feeder.erje.net!2.us.feeder.erje.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!gordon
From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: error reading api with urllib
Date Wed, 16 Dec 2015 22:12:02 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 19
Message-ID <n4snji$mi4$1@reader1.panix.com> (permalink)
References <9aa21642-765b-4666-8c66-a6dab9928c37@googlegroups.com>
NNTP-Posting-Host panix2.panix.com
X-Trace reader1.panix.com 1450303922 23108 166.84.1.2 (16 Dec 2015 22:12:02 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Wed, 16 Dec 2015 22:12:02 +0000 (UTC)
User-Agent nn/6.7.3
Xref csiph.com comp.lang.python:100538

Show key headers only | View raw


In <9aa21642-765b-4666-8c66-a6dab9928c37@googlegroups.com> simian336@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@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

error reading api with urllib simian336@gmail.com - 2015-12-15 17:54 -0800
  Re: error reading api with urllib Simian <simian336@gmail.com> - 2015-12-15 18:46 -0800
    Re: error reading api with urllib Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-16 16:22 -0700
  Re: error reading api with urllib John Gordon <gordon@panix.com> - 2015-12-16 22:12 +0000
    Re: error reading api with urllib Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-16 16:24 -0700
  Re: error reading api with urllib Simian <simian336@gmail.com> - 2015-12-17 11:29 -0800

csiph-web