### Non-UI App waiting HTTP Request completion

Example of Non-UI App sending HTTP Request which waits for the HTTP job to complete befor continuing.
This is done by
1 Start the job first (job1.Download...)
2 Wait for the job to complete (StartMessageLoop)
3 When job is done Stop the Message Loop (StartMessageLoop)
If in below Sub AppStart StartMessageLoop is left out, then the code immediate continious after job1.Download)
Start the job
`Sub AppStart (Args() As String)
Dim job1 As HttpJob
job1.Initialize("job1", Me)
Log("Submitting Job #1")
job1.Download("http://192.168.0.20:8080/json.htm?type=devices&filter=all&used=true&order=Name")
StartMessageLoop
Log("This entry is shown after Job #1 is done")
ExitApplication
End Sub`
Handle Job done
`Private Sub JobDone (Job As HttpJob)
Log("Job result for JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Log("Job OK")
Else
Log("Job Error Server Response: " & Job.ErrorMessage)
End If
Job.Release
StopMessageLoop
End Sub`
Output
`Submitting Job #1
Job result for JobName = job1, Success = true
Job OK
This entry is shown after Job #1 is done
`

Changed: , Category: Server, File: T6C246M1783.htm, ID: 1783