Skip to main content
Question

Download ZIP-File from a REST Response

  • June 4, 2020
  • 2 replies
  • 360 views

Forum|alt.badge.img

Hello

Following situation: Via HTTP-Caller I send a POST. Via the normal way, when I send the POST via a REST-Editor (Postman) then I got a response in JSON-Format with an URL, which I click it downloaded a zip-File with the data. My first question: How I catch in the HTTP-Caller the response? Or is a option to trigger immediately the download of the zipFile?

Thanks

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • June 4, 2020

You should be getting the JSON response in the "_response_body" attribute from the HTTPCaller:

From there on you can use e.g. the JSONFlattener to extract the URL into an attribute, then another HTTPCaller set to download the zip from that URL:

This article contains a lot of great information on how to work with APIs using the HTTPCaller, if you haven't seen it already:

https://knowledge.safe.com/articles/92720/how-to-access-an-api-using-the-httpcaller.html

 


Forum|alt.badge.img
  • Author
  • June 9, 2020

Thanks a lot for your precious answer