job1.PostString("https://www.site.com/ajax/post/receive", "username=a&password=1234&play=clip1")
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
parser.Initialize(Job.GetString)
Dim root As Map = parser.NextObject
Dim result As String = root.Get("result")
Log(result)
If result = "ok" Then
'Activity.Color = Colors.Green
Msgbox("OK - Request sent", "SERVER")
Dim jsonLine As String
jsonLine = $"{agent:""$ & myAgentID & _
$"",username:""$ & myUsername & _
$"",password=""$ & mypassword & $""}"$
Log(jsonLine)
'writeLogin(jsonLine)
Else
Msgbox("Failed", "Login")
Activity.Color = Colors.red
'callApp
End If
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub