Hello Team ! I am currently trying to read a raw zip file from API call via HTTP Client Snap with binary output view and I want to send the file to another endpoint as multipart form using HTTP Client snap, how can i do that ?
I actually had to solve the same issue recently, in my case it was in between 2 google drive APIs. The main issue was caused by the binary input view from the HTTP Client which expects lower case $['content-location'] and $['content-type']. You can use a mapper in between the two to solve this problem, this should solve this for now, while we work to enhance this behaviour so that the HTTP Client Input view support all case variations of the Content* headers.
Jocelyn A. Thanks, the above method worked like a charm. Please correct me if I’m wrong, but my understanding is that the $['content-location'] field can have any value—it’s required mainly because the actual file content is transferred via the binary output view of the previous Snap.
it can have any value yes, but the google api I use in the first http client doesn't include the filename in the response, hence I take it from the original object which has it from a previous step. I also change the extension to pdf as I am converting the file to a pdf in the second HTTP client.
Got it, understood 👍 In my first HTTP Client (where I use the GitLab API), the response doesn’t return a location or filename. So I populated the $['content-location'] value from pipeline parameters, and it worked even though that value isn’t an actual upload location. Thanks Jocelyn A. for the quick and prompt response!
