Not sure if this is a bug or, more likely, my lack of understanding.
Using the https://www.b4x.com/android/forum/threads/class-httputils2.46565/ modules and then trying to download a file with e.g: job1.download(urltofile) I get "Error decoding data as string."
It seems the code is trying to read the file as a string when it should only be downloading it.
The error is generated in module "httpjob":
I`ve worked around it by putting the Return res... in a Try/Catch block and that enabled the file to download successfully.
As I say, it`s most likely my lack of understanding but hopefully someone can explain what went wrong.
Thank you,
Mike.
Using the https://www.b4x.com/android/forum/threads/class-httputils2.46565/ modules and then trying to download a file with e.g: job1.download(urltofile) I get "Error decoding data as string."
It seems the code is trying to read the file as a string when it should only be downloading it.
The error is generated in module "httpjob":
B4X:
'Returns the response as a string.
Public Sub GetString2(Encoding As String) As String
Return res.GetString2(Encoding)
End Sub
I`ve worked around it by putting the Return res... in a Try/Catch block and that enabled the file to download successfully.
As I say, it`s most likely my lack of understanding but hopefully someone can explain what went wrong.
Thank you,
Mike.