cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to Handle image as response body of Rest get/Post snap

vaidyarm
Contributor

Hi

I am having an API that responds back with a dummy image as the body of response, that API works fine as long as I am using it outside of snaplogic on tools such as postman.
but when same I try to execute via REST POST snap, it routes to the error view even though execution in that test is done via snaplogic is successful.

body of response looks like this :

image

Let me know how snaplogic handles API calls when the response is of image type

Thanks

1 REPLY 1

alchemiz
Contributor III

Hi Rahul,

Good day, try setting the Rest Post snap โ€œresponse entity typeโ€ to binary then encode/decode the entity response to be able to save the response as a file

image

You can use a mapper snap to output as binary and connect to a file writer snap

image

Thanks