Sub Process_Globals
Private hc As OkHttpClient
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
hc.Initialize("hc")
Dim jo As JavaObject = hc
jo.GetFieldJO("client").RunMethod("setFollowRedirects", Array (False))
End If
Dim req As OkHttpRequest
req.InitializeGet("http://www.b4x.com")
hc.Execute(req, 0)
End Sub
Sub hc_ResponseError (Response As OkHttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Log(Response.ErrorResponse)
End Sub
Sub hc_ResponseSuccess (Response As OkHttpResponse, TaskId As Int)
End Sub