I am using the Download method of an HttpJob problem with no problems at all in most cases. However there is one URL that is providing some strange error. When I create this same request using both native code, Xamarin F#, or simply paste the URL in a browser I have no problems at all. The URL is this
http://sos.homedns.org/Api/StoneColdApi/?queryName=select_orders¶meters=%,2014-12-8,_
Here is an example of a URL that works with HttpJob
http://sos.homedns.org/Api/StoneColdApi/?queryName=select_orders¶meters=PS,2014-12-8,0
There is no "error". This is what the debug pane says.
Application_Start
Application_Active
Error response: , status code: 0
JobName = selectOrders, Success = false
Error: The operation couldn’t be completed. (NSURLErrorDomain error -1002.)
http://sos.homedns.org/Api/StoneColdApi/?queryName=select_orders¶meters=%,2014-12-8,_
Here is an example of a URL that works with HttpJob
http://sos.homedns.org/Api/StoneColdApi/?queryName=select_orders¶meters=PS,2014-12-8,0
B4X:
Sub SubmitButton_Click
OrderSource = "%"
CartID = "_"
Dim selectOrdersHttp As HttpJob
selectOrdersHttp.Initialize("selectOrders", Me)
selectOrdersHttp.Download("http://sos.homedns.org/Api/StoneColdApi/?queryName=select_orders¶meters=" & OrderSource & "," & DatePicker.GetSelectedItem(2) & "-" & (DatePicker.GetSelectedRow(0) + 1) & "-" & DatePicker.GetSelectedItem(1) & "," & CartID)
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "selectOrders"
selectOrders(Job.GetString)
Case "selectOrderDetail"
selectOrderDetail(Job.GetString)
End Select
Else
Log("Error: " & Job.ErrorMessage)
Toast.ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
There is no "error". This is what the debug pane says.
Application_Start
Application_Active
Error response: , status code: 0
JobName = selectOrders, Success = false
Error: The operation couldn’t be completed. (NSURLErrorDomain error -1002.)