iOS Question HttpUtils download error


Well-Known Member
Licensed User
Longtime User
Not sure if this is a bug or, more likely, my lack of understanding.

Using the modules and then trying to download a file with e.g: 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":

'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,


Licensed User
Longtime User
old thread but I have the same issue when using the standard getstring. the windows based encoding as in the original example works fine tho.

        Select Job.JobName
            Case "Job1"
                Log(Job.GetString) 'fails
                Log(Job.GetString2("Windows-1252")) 'works
        End Select
Upvote 0