Sub Activity_Create(FirstTime As Boolean)
Dim job1, job2, job3 As HttpJob
job1.Initialize("Job1", Me)
'Send a GET request
job1.Download2("http://www.mysite.com/include/config.php?token=202447d5d44ce12531f7207cb33b6bf7", _
Array As String("do", "teste"))
'Send a POST request
job2.Initialize("Job2", Me)
job2.PostString(""http://www.mysite.com/include/config.php?token=202447d5d44ce12531f7207cb33b6bf7"", "do=add-admin&[email protected]&passwd=dwdwd15115151")
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1", "Job2"
'print the result to the logs
Log(Job.GetString)
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub