sub SendReq
...
req.InitializePost2(adrstr, " ".GetBytes("UTF8"))
hcPos.Execute(req, 1)
end sub
Sub hcPos_ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Dim Message As String
Log("Error UPDPOS: " & Reason & ", StatusCode: " & StatusCode)
If Response <> Null Then
Log(Response.GetString("UTF8"))
Response.Release
End If
end sub
Sub hcPos_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Dim res As String
Dim parser As JSONParser
Dim MsgList As List
res = Response.GetString("UTF8")
Log("Response SMSG " & TaskID & " from server: " & res)
parser.Initialize(res)
MsgList = parser.NextArray
... do something
response.Release
End Sub