Giuseppe Member since 2018 6 posts
Knowledge Expert SA
Posted: 1 year ago
Last activity: 1 year 4 months ago

How to decode a Zip file from a REST GET response


My application has to call an external REST service with Basic Authentication in order to retrieve and download a zip file (byte array) containing a set of files. The response is a simple byte array, not a json. The goal is to provide to the user a button to download that specific file. Since the service is available only on client specific network and only Pega has the access, first the zip file has to be downloaded in Pega and then to be made available to the final user.

I created a simple REST connector and mapped the response on a property of Text Type giving me the byte array as raw string. When I call the connector from a data page the response is displayed as it's shown in the attachment. If I tried to map the response on a Java Object of class but I don’t receive anything in this case.

  1. What is the best way to map the response?
  2. How the response can be manipulated/decoded in Pega and make it available when the user click on a the button?
Low-Code App Development Dev/Designer Studio Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn