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