urllib question

rdack rdacker at pacbell.net
Thu Jun 13 21:39:56 EDT 2002


rdacker at pacbell.net (rdack) wrote in message news:<644f6688.0206101835.5dc793b1 at posting.google.com>...
> this retrieves data from my router:
>   params = urllib.urlencode({'RC': '@D', 'ACCT' : "root", 'PSWD' :
> "71:29:26", 'URL': 'admin' })
>   ipurl = "http://" + iphost + "/cgi-bin/logi"
>   urlfp = urllib.urlopen(ipurl, params)
> 
is there some way i can what exactly this is posting?
a way to get the post object out of urlib?
it should be something like:

POST http://192.168.0.1/cgi-bin/logi
Content-Length: 47
Content-Type: application/x-www-form-urlencoded

RC=%40D&PSWD=71%3A29%3A26&URL=admin&ACCT=root



More information about the Python-list mailing list