
February 18th, 2013, 02:22 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 5
Time spent in forums: 1 h 10 m 55 sec
Reputation Power: 0
|
|
|
Use pycurl to post a web form
Hi everyone,
Does anyone know how to use pycurl to post a web form? I use this:
c=pycurl.Curl()
c.setopt(c.URL, url)
fields = [('name', 'tomas')]
c.setopt(c.HTTPPOST, fields)
c.setopt(c.USERPWD, 'user:password')
c.perform()
But this gives a HTTP 200 instead of HTTP 201 code back. It has not submitted the form.
Thanks very much!
Tomas
|