Need help with http get

194 views
Skip to first unread message

Shadowwoelf

unread,
Jan 8, 2012, 2:02:06 AM1/8/12
to Tasker
I am trying to use http get to get weather from worldweatheronline.

I used this profile as a template for figuring out how to do this.
http://tasker.wikidot.com/automatic-location-weather

The url I need to use is:

free.worldweatheronline.com/feed/weather.ashx?q=
%zipcode&format=xml&num_of_days=5&key=%key

When I run the task the only thing that is displayed is %HTTPD.

Any help would be great.

Pent

unread,
Jan 8, 2012, 5:07:57 AM1/8/12
to Tasker
> free.worldweatheronline.com/feed/weather.ashx?q=
> %zipcode&format=xml&num_of_days=5&key=%key
>
> When I run the task the only thing that is displayed is %HTTPD.

What's in %HTTPR afterwards ? Try enabling Menu / Prefs / Misc / Popup
Errors/Warnings also.

Pent

Shadowwoelf

unread,
Jan 8, 2012, 10:34:53 AM1/8/12
to Tasker
HTTPR is 200
HTTPL is 1742

Jenny Hawkins

unread,
Jan 8, 2012, 10:38:08 AM1/8/12
to Tasker

I am having similer problems with http get. My %HTTPD returns empty,
and %HTTPR contains the 400 error. I ran a wireshark capture, where I
saw tasker using a post rather then a get. If I use the same url in
the browser, it completes successfully, with get/post being the only
noticible difference in the capture.

My http get contains only 192.168.1.56:8080/remote/processKey?
key=poweroff in the Server:Port. It is a remote command for my directv
reciever box. Tasker is the market version 1.2

Shadowwoelf

unread,
Jan 8, 2012, 11:02:39 AM1/8/12
to Tasker
I was able to output the data into a file, but I can't seem to be able
to edit the %httpd. It still says that there is no data in %httpd.

I made a work around where I first outputed all the info to
weather.xml. From there I made a variable called %weather. Then I used
read paragraph and put the entire text into the variable. Later on
i'll use variable splitter to grab the data I need.

How was I supposed to use %httpd?

Pent

unread,
Jan 8, 2012, 12:22:08 PM1/8/12
to Tasker
> I was able to output the data into a file, but I can't seem to be able
> to edit the %httpd.  It still says that there is no data in %httpd.

Then probably you have the content type set to non-text, so Tasker
thinks it can't store the data there. Think it's mentioned in the
action help.

Pent

Pent

unread,
Jan 8, 2012, 12:24:22 PM1/8/12
to Tasker
> I am having similer problems with http get. My %HTTPD returns empty,
> and %HTTPR contains the 400 error.

No, that's not related. 400 means 'bad request'.

>  I ran a wireshark capture, where I
> saw tasker using a post rather then a get. If I use the same url in
> the browser, it completes successfully, with get/post being the only
> noticible difference in the capture.
>
> My http get contains only 192.168.1.56:8080/remote/processKey?
> key=poweroff in the Server:Port. It is a remote command for my directv
> reciever box. Tasker is the market version 1.2

Put the 'remote/processKey?key=poweroff' part in the path field and
dump
the / from the end of server:port ?

Pent

Jenny Hawkins

unread,
Jan 8, 2012, 3:00:06 PM1/8/12
to Tasker


On Jan 8, 10:24 am, Pent <supp...@apps.dinglisch.net> wrote:
>
> No, that's not related. 400 means 'bad request'.
>

Apologies. I was typing my post when the OP added his %HTTPR and
%HTTPL, and I didn't see them.. I had keyed on the empty %HTTPD.

>
> Put the 'remote/processKey?key=poweroff' part in the path field and
> dump
> the / from the end of server:port ?

Unfortunatly, this did not help. Got the same results. This task
worked on a honeycomb device, but not on ice cream sandwich.

Pent

unread,
Jan 8, 2012, 3:05:00 PM1/8/12
to Tasker

> Unfortunatly, this did not help. Got the same results. This task
> worked on a honeycomb device, but not on ice cream sandwich.

What content type do you have set ?

Pent

Shadowwoelf

unread,
Jan 8, 2012, 3:37:02 PM1/8/12
to Tasker
Thanks Pent, all I had to do was change Mime type to text/xml. Now
httpd is properly being populated.

Jenny Hawkins

unread,
Jan 8, 2012, 4:13:05 PM1/8/12
to Tasker


On Jan 8, 1:05 pm, Pent <supp...@apps.dinglisch.net> wrote:
> What content type do you have set ?
>
> Pent

It had been empty, but now is text/xml, with no improvment. I ran it
with the full line in server:port, and split into the path. I did try
connecting to the OP's weather service, and successfully got data.

Pent

unread,
Jan 9, 2012, 4:25:11 AM1/9/12
to Tasker
> It had been empty, but now is text/xml, with no improvment. I ran it
> with the full line in server:port, and split into the path. I did try
> connecting to the OP's weather service, and successfully got data.

Seems like your 'using Post instead of Get' is the likely culprit,
also reported by someone else. Will take a look of course.

Pent

Pent

unread,
Jan 9, 2012, 5:11:48 AM1/9/12
to Tasker
Jenny, which Android version ?

Thanks,

Pent

Jenny Hawkins

unread,
Jan 9, 2012, 2:52:00 PM1/9/12
to Tasker
4.0.2

Maycow F

unread,
Feb 10, 2017, 11:08:03 AM2/10/17
to Tasker
I was having the same trouble. Just setted Content Type to text/plain and now it works like a charm :D
Reply all
Reply to author
Forward
0 new messages