A best approach to a creating specified http post body

Facundo Batista facundo at taniquetil.com.ar
Fri May 18 13:03:34 EDT 2007


dzawer at gmail.com wrote:

> Hmm, I guess I meant something different by using "body"- I meant
> request data part and not the thing sent in ulr string.

You should specify better what you need yes.

See, to send POST information in an http request, you can do the
following...

>>> urllib2.urlopen(myurl, data=postbody)

...being postbody a string with the information you want to send, for
example "Hello world", "a=5&no=yes", or "\n\n\r\tMMalichorhoh829dh9ho2"

So, you need help building a post body, or you need building a string?

Regards,

-- 
.   Facundo
.
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/





More information about the Python-list mailing list