HTTP POST and URL-encoding

606 views
Skip to first unread message

Peter Fässberg

unread,
Jan 15, 2016, 4:37:01 PM1/15/16
to Tasker
Hi!

When using HTTP GET method the URL and its data parameters are correctly URL-encoded.

When using HTTP POST method the data isn't URL-encoded and I can't find any relevant settings.  I thought that setting Content type to "x-www-form-urlencoded" should do the trick, but it doesn't.

Is there a way to URL-encode the data using HTTP POST?



Pent

unread,
Jan 16, 2016, 3:02:39 AM1/16/16
to Tasker
If you want to send URL-encoded content you can do it yourself with the Variable Convert action.

Pent

Pent

unread,
Jan 16, 2016, 3:03:18 AM1/16/16
to Tasker

When using HTTP GET method the URL and its data parameters are correctly URL-encoded.

Because they are part of the URL...

When using HTTP POST method the data isn't URL-encoded

Why should it be ?

Pent

Peter Fässberg

unread,
Jan 16, 2016, 3:27:01 AM1/16/16
to Tasker
Thank you, I will look into that.

Peter Fässberg

unread,
Jan 16, 2016, 3:45:30 AM1/16/16
to Tasker
.

When using HTTP POST method the data isn't URL-encoded

Why should it be ?

Because most form receivers suppose that the data is URL encoded.  


The second bullet gives me problem when transmitting the %WIFII variable as that can easily include an ampersand.  There are other variables at risk as well.  This is handled very well in the GET URL-encoding, and the same should apply if using POST and type x-www-form-urlencoded.


Reply all
Reply to author
Forward
0 new messages