iOS Question Http Get and Post

boastrike

Member
Licensed User
I have read through https://www.b4x.com/b4i/documentation.html and attempted to use the iHttp library for a simple get request. The "callbacks", ResponseSuccess or ResponseError are not firing. I do not normally program in VB. Any help would be appreciated.

Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.

Private DatePicker As Picker
Private ResultScroll As ScrollView
Private SubmitButton As Button

Private httpTool As HttpClient
Public AdHocText As TextView
End Sub

Sub SubmitButton_Click
AdHocText.Text = "Attempting query"
httpTool.Initialize("")

Dim httpReq As HttpRequest
httpReq.InitializeGet("http://sos.homedns.org/Api/StoneColdApi/?queryName=select_orders&parameters=PS,2014-11-20,0")

httpTool.Execute(httpReq, 1)
End Sub

Sub ResponseSuccess (Response As HttpResponse, TaskId As Int)
AdHocText.Text = Response.GetString
End Sub

Sub ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
AdHocText.Text = Reason
End Sub
 
Top