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