Sub Process_Globals
Dim hc As HttpClient
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
hc.Initialize("hc")
End If
Dim req As HttpRequest
req.InitializePost2("http://www.b4x.com/print.php", "user=erel&animal=cat".GetBytes("UTF8"))
hc.Execute(req, 1)
End Sub
Sub hc_ResponseError (Reason As String, StatusCode As Int, TaskId As Int)
Msgbox(reason, "error")
End Sub
Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Msgbox(Response.GetString("UTF8"), "success")
End Sub