Dim j As HttpJob
j.Initialize("", Me)
j.Download("https://www.xxxxx.it/s/id_file/download/file.csv") 'drive Aruba
j.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36")
Wait For (j) JobDone(j As HttpJob)
If j.Success = True Then
Dim out As OutputStream
Dim in As InputStream
in = j.GetInputStream
out = File.OpenOutput(File.DirInternal , "file.csv", False)
Wait For (File.Copy2Async(in, out)) Complete (Success As Boolean)
Log("Success: " & Success)
in.close
out.Close
Else
Log("Fallito")
End If
j.Release