Sub RunMe
Dim rs As ResumableSub = GetPage
Wait For(rs) Complete (Result As String)
Log(Result)
End Sub
Sub GetPage As ResumableSub
Dim j As HttpJob
j.Initialize("", Me)
j.Download("https://www.google.com")
Wait For (j) JobDone(j As HttpJob)
Dim ValueToReturn As String
If j.Success Then
ValueToReturn = j.GetString
Else
Log("error")
End If
j.Release
Return ValueToReturn
End Sub