Question on Httputils

Toni

Member
Licensed User
Longtime User
Hello together,

at first let me say 'Thank you' to Erel for a great tool, as far as I can rate as a newbie:sign0098:

I'd tried out to send a 'GET' query via Httputils to a server that should return a gpx file.
I used the code from your simple httputils example, but I doomed to failure just at the beginning :BangHead:. What's wrong? The string works fine on the PC (with a requestbox for saving the file) as well as in the webview in b4a.
It is a query to cloudmade from the original example (incl. example key), I'd only removed the part with the sqare brackets. --> Routing - Wiki

Here is my (your) code and the log file:

Sub Globals
Dim myquery As String
myquery = "http://routes.cloudmade.com/8ee2a50541944fb9bcedded5165f09d9/api/0.3/54.5409,-2.9637,54.5409,-2.9637/foot.gpx"
End Sub

Sub Activity_Create (FirstTime As Boolean)
HttpUtils.CallbackActivity = "Main" 'Current activity name.
HttpUtils.CallbackJobDoneSub = "JobDone"
HttpUtils.Download("Job1", myquery)
End Sub

Sub JobDone (Job As String)
Dim in As InputStream
If HttpUtils.IsSuccess(myquery) Then
in = HttpUtils.Getinputstream(myquery)
End If
End Sub


** Activity (main) Create, isFirst = true **
Starting Job: Job1
** Activity (main) Resume **
** Service (httputilsservice) Create **
** Service (httputilsservice) Start **
Error. Url=http://routes.cloudmade.com/8ee2a50541944fb9bcedded5165f09d9/api/0.3/54.5409,-2.9637,54.5409,-2.9637/foot.gpx Message=Internal Server Error
Sorry, some unrecoverable error happened
** Service (httputilsservice) Destroy **

:sign0163: with an idea what I'm doing wrong?! Answers in german are very welcome as Ich bin Deutscher :D

Thanx a lot Toni
 
Top