POST

Joonas Paalasmaa joonas at olen.to
Fri Apr 6 17:01:47 EDT 2001


pi wrote:
> 
> What I can fill the form on www (method POST)
> 
> -----
> POST /glosuj/ HTTP/1.0
> Host: nlp.wp.pl
> Accept: text/html, text/plain, application/msword, audio/x-mpeg,
> audio/x-pn-realaudio, audio/x-pn-realaudio-plugin, text/sgml, */*;q=0.01
> Accept-Encoding: gzip, compress
> Accept-Language: pl
> Accept-Charset: iso-8859-2, iso-8859-1;q=0.01, us-ascii;q=0.01
> Pragma: no-cache
> Cache-Control: no-cache
> User-Agent: Lynx/2.8.4dev.8 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.5a
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 120
> url=http%3A%2F%2Fwww.smiechuwarte.prv.pl%2F&rank=4&group=fun&comment=koment&nick=email at w.pl&reward=rmf-s&submit=Oddaj+glos


You can use urllib to use POST method by passing the form data to second
argument of urllib.urlopen

import urllib
urllib.urlopen("http://spam.eggs","foo=bar").read()

--
Joonas Paalasmaa



More information about the Python-list mailing list