[PyAR2] POST with Python?

Chad Cooper Chad_Cooper at SWN.COM
Fri Jan 25 18:50:58 CET 2008


I was up late last nite trying to POST data to Flickr and its giving me
fits, something wrong with my input params. So thanks, this helps me
understand it a little bit more. 

 

chad!

 

________________________________

From: pyar2-bounces at python.org [mailto:pyar2-bounces at python.org] On
Behalf Of Coltrey Mather
Sent: Friday, January 25, 2008 11:47 AM
To: pyar2 at python.org
Subject: Re: [PyAR2] POST with Python?

 

post = urllib.urlopen('www.site.com/page.php', params)

On Jan 25, 2008 11:40 AM, W W <srilyk at gmail.com> wrote:

Ahah! I found out. Quite simple, really

params = urllib.urlencode({'name': 'Bob'})
post = urllib.urlopen('www.site.com/page.php'
<http://www.site.com/page.php%27> )
post = post.read()

And that's all she needs!
-Wayne

 

On Jan 25, 2008 11:31 AM, W W <srilyk at gmail.com> wrote:

It appears possible, though it looks like any solution I've seen is too
convoluted for what I want (maybe not though)

basically, I want to use the POST method to request data from a server.

instead of www.site.com/page.php?name=Bob (the GET fashion)
I want to be able to use the POST method.

Any help would be great! Thanks!
-Wayne

-- 
To be considered stupid and to be told so is more painful than being
called gluttonous, mendacious, violent, lascivious, lazy, cowardly:
every weakness, every vice, has found its defenders, its rhetoric, its
ennoblement and exaltation, but stupidity hasn't. - Primo Levi 




-- 
To be considered stupid and to be told so is more painful than being
called gluttonous, mendacious, violent, lascivious, lazy, cowardly:
every weakness, every vice, has found its defenders, its rhetoric, its
ennoblement and exaltation, but stupidity hasn't. - Primo Levi 


_______________________________________________
PyAR2 mailing list
PyAR2 at python.org
http://mail.python.org/mailman/listinfo/pyar2

 


Notice:  This e-mail may contain privileged and/or confidential
information and is intended only for the addressee. If you are not the
addressee or the person responsible for delivering it to the addressee,
you may not copy or distribute this communication to anyone else. If you
received this communication in error, please notify us immediately by
telephone or return e-mail and promptly delete the original message from
your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/mailman/private/pyar2/attachments/20080125/7faeda63/attachment-0001.htm 


More information about the PyAR2 mailing list