Public Sub Connect(S1 As String,S2 As String, S3 As String, S4 As String, MyBool As String) As ResumableSub
Log("First") ' This log does not even appear
client.Initialize("",Me)
client.Download("https://www.myserver.xx")
client.GetRequest.SetHeader("User-Agent","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36")
Wait For (client) JobDone(j As HttpJob)
if j.success=False then return False
Log("Second pass")
client.Download("https://www.myserver.xx/second/")
client.GetRequest.SetHeader("User-Agent","Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36")
Wait For (client) JobDone(j As HttpJob)
if j.success=False then return False
Return true
End SUb