[Twisted-Python] twisted.web.client POST data
Andrew Francis
andrewfr_ice at yahoo.com
Mon Sep 15 08:33:41 MDT 2008
Hi Vasil:
>I'm trying to send a post request like so
>getPage('http://localhost/test/test/', method='POST' postdata='test=asdf')
>But the server script doesnt get any post arguments.
>I was looking at the code for web.client and cant see where im doing
>wrong here.
>Any ideas what might be the problem? I'm using an svn checkout of Twisted.
I will assume you did things like check your web server's log to see if a connection was made and if there was an error.....
Since you are using the POST method, I would expect you would have to set the headers argument (a dictionary). I notice the header argument is missing. I would expect entries such as Content-Type and Content-Length.
Cheers,
Andrew
More information about the Twisted-Python
mailing list