HttpTask with api streaming a file back as response

Hi ,
I’m using Http task , with an API that streams a file back as output.After the engine updates its response,in the DelegateExecution i’m trying to get the response and write it to a file. In this case the file is corrupted for all formats except ’ .txt ’ format.

why is this happening?

Thanks in advance for your response !!

Hi,

Is the REST Service setting the right content type in the response?
It’s not advised to set the file as a variable to the process instance. It’s maybe easier to use a HttpResponseHandler and do the file handling directly there. For an example see this test class:

Best regards,

Tijs