The following code works, but intermittently crashes. It is pretty much exactly what is described in the examples. So I am stumped.
Here are the Logs:
Any assistance is greatly appreciated.
B4X:
Sub UrlFetch(getUrl As String, param() As String) As ResumableSub
Log("==============================================")
Log(">> UrlFetch")
Log("==============================================")
Dim job As HttpJob
Dim urlContent As String
job.Initialize("", Me)
job.Download2(getUrl,param)
Log("FINISHED: UrlFetch -> Start Download Job") 'Checking if request is executed
Wait For (job) JobDone (job As HttpJob)
Log("FINISHED: UrlFetch -> End Download Job") 'Checking if response is executed
If job.Success Then
Log(job.GetString)
urlContent = job.GetString
Else
Log("Error: " & job.ErrorMessage)
End If
job.Release
'CallSubDelayed(Me, "UrlFetch_Complete")
Log("FINISHED: UrlFetch") 'Check if sub finished
Return urlContent
End Sub
Here are the Logs:
Any assistance is greatly appreciated.