HTTP Post Problem

114 views
Skip to first unread message

Michael Frey

unread,
Feb 23, 2012, 5:58:33 AM2/23/12
to Tasker
I have a POST set up with the following data, each on a new line.

username=myname
password=mypass
data=mydata

If I use a content type of text/*, text/plain or text/html the
returned variables are:
%HTTPR: 200
%HTTPL: 42
%HTTPD: missing credentials (username was:)

So somehow the post does not send the data.

If I use the content type: application/x-www-form-urlencoded the
variables are:
%HTTPR: 200
%HTTPL: 23
%HTTPD: %HTTPD

So it seems that the data returned is not read correctly into the
%HTTPD variable.

Is this a bug, or how could i fix this?

Michael

Pent

unread,
Feb 23, 2012, 6:07:48 AM2/23/12
to Tasker
> I have a POST set up with the following data, each on a new line.
>
> username=myname
> password=mypass
> data=mydata

Are you trying to use the basic authorization scheme ?

Pent

himanshu patel

unread,
Feb 23, 2012, 6:20:04 AM2/23/12
to tas...@googlegroups.com
I am Not getting the Question exactly

Can you please elaborate?

Regards
Himanshu

Michael Frey

unread,
Feb 23, 2012, 6:26:45 AM2/23/12
to Tasker
No it's not authentication. The website is an API for sending sms and
it requires that information, but it is not actual authentication in
the sense of ssl or logging in.

Michael Frey

unread,
Feb 23, 2012, 6:29:30 AM2/23/12
to Tasker
I will elaborate on this.

The url is an API for sending SMS through a server. The response is
supposed to be something like: 1|cost=1.5

But it refuses to return that specific message, due to the problems
described in my original post.

Pent

unread,
Feb 23, 2012, 6:56:00 AM2/23/12
to Tasker

> If I use the content type: application/x-www-form-urlencoded the
> variables are:
> %HTTPR: 200
> %HTTPL: 23
> %HTTPD: %HTTPD

You can write it to a file (using the parameter in the HTTP Post
action), then read it back with File / Read Line. It's because Tasker
isn't sure the content is text so won't put it in a text variable.

Pent

Michael Frey

unread,
Feb 23, 2012, 7:06:56 AM2/23/12
to Tasker
That works. This would be a good feature on the HTTP setup screen.
Include a checkbox to force the post to accept the response as text.

Michael
Reply all
Reply to author
Forward
0 new messages