Download file from remote server

Hi,
I’ve got an API that retrieves a download link for a pdf file from an external party using an API, and I have to pass that file along as the response to another application. The external party returns the file URL in the response body and I want to download it to the server so I can pass it along in the response of my API.

I guess your question is: how to do this?

Can’t you create a GET request with the download link using the HTTP plugin?
Once you get the response, you can get the media data from the response, this should be a byteArray.

Then start a second request to send the file to the other application.

Hope this helps

Hi Marc,
Yes that works, thanks!
Did not see the getMediaData for the response. I was looking for a download file option.