B4X:
Dim j As HttpJob
j.Initialize("", Me)
j.Download("https://www.xxxxx.it/s/id_file/download/file.csv") 'drive Aruba
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