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


Groups > comp.lang.python > #100541

Re: error reading api with urllib

From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Subject Re: error reading api with urllib
Date 2015-12-16 16:24 -0700
Message-ID <mailman.26.1450308337.30845.python-list@python.org> (permalink)
References <9aa21642-765b-4666-8c66-a6dab9928c37@googlegroups.com> <n4snji$mi4$1@reader1.panix.com>

Show all headers | View raw


On Wed, Dec 16, 2015 at 3:12 PM, John Gordon <gordon@panix.com> wrote:
> 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.)

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.

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