cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP request (GET) with zip / binary response

MateuszBlazej
Level 3
Hi,

I use "HTTP Request" action from standard "Utility - HTTP" object. It works correctly, I get responses. The problem is a response type which is a zip file.

Could you give me some advices how to modify this code to get resultData in binary format (if my understanding is correct this is a valid format if reponse is the zip file)?

Using response As WebResponse = request.GetResponse()
resultHeadersJson = JsonConvert.SerializeObject(ToDictionary(response))
Dim responseStream As IO.Stream = response.GetResponseStream()
Dim sr As New IO.StreamReader(responseStream)
resultData = sr.ReadToEnd()
End Using

Thank you in advance,

------------------------------
Mateusz
RPA Developer
Warsaw
------------------------------
1 REPLY 1

AnonymousNoname
Level 2
Good question. I have the same issue when I get a response with a PDF in it. Look like the code handles only text streams. Would love to see code for binary too.

------------------------------
Anonymous Noname
Employee
Privet
America/Edmonton
------------------------------