librelist archives

« back to archive

post params as application/x-www-url-form-encoded

post params as application/x-www-url-form-encoded

From:
Leonardo Lazzaro
Date:
2011-11-16 @ 03:13
Hello,
Do request supports sending params as application/x-www-url-form-encoded
thanks!

Re: post params as application/x-www-url-form-encoded

From:
Piotr Dobrogost
Date:
2011-11-18 @ 20:34
Leonardo Lazzaro wrote:

> Hello,
> Do request supports sending params as application/x-www-url-form-encoded
> thanks!

This encoding is used by default unless you're uploading files.

>>> requests.post('http://httpbin.org', 
data={'param':'value'}).request.headers['content-type']
'application/x-www-form-urlencoded'


Regards
Piotr

Re: [requests] re: post params as application/x-www-url-form-encoded

From:
Leonardo Lazzaro
Date:
2011-11-18 @ 21:11
Piotr,
I apply a patch to use ';' as cookie separator, post is being sent
successfully. But, I loose the session. I think that the cookie being sent
is always empty.

Thanks!

On Fri, Nov 18, 2011 at 4:34 PM, Piotr Dobrogost <pd@librelist.dobrogost.net
> wrote:

> Leonardo Lazzaro wrote:
>
> > Hello,
> > Do request supports sending params as application/x-www-url-form-encoded
> > thanks!
>
> This encoding is used by default unless you're uploading files.
>
> >>> requests.post('http://httpbin.org',
> data={'param':'value'}).request.headers['content-type']
> 'application/x-www-form-urlencoded'
>
>
> Regards
> Piotr
>



-- 
http://www.lazzaroleonardo.com.ar/
twitter @llazzaro