Hi to everybody
I have a problem getting the response of an OkHttpResponse Object.
Here is my code:
And here is the log:
I`ve attached a screenshot.
Any idea??
Thanks in advance
I have a problem getting the response of an OkHttpResponse Object.
Here is my code:
B4X:
Sub wc_ResponseSuccess (Response As OkHttpResponse, TaskId As Int)
ProgressDialogHide
If Response.ContentType = "text/plain; charset=UTF-8" Then
Dim Out As OutputStream = File.OpenOutput(File.DirDefaultExternal, "Log.txt", False)
Log(Response.GetAsynchronously("GetResponse", Out, True, TaskId))
End If
End Sub
Sub GetResponse(Success As Boolean, TaskId As Int)
If Success Then
Dim In As InputStream = File.OpenInput(File.DirDefaultExternal, "Log.txt")
Dim Reader As TextReader
Reader.Initialize(In)
Log(Reader.ReadAll)
In.Close
Else
Log(LastException)
End If
End Sub
And here is the log:
true
java.lang.Exception: Sub getresponse_streamfinish was not found.
I`ve attached a screenshot.
Any idea??
Thanks in advance