241
Views
3
Comments
Solved
Consume binary data from rest api

Hi All,

I am trying to consume rest api ,when i have checked from postman it is sending binary content,

But the api specification does not have binary data as in response.

Can anyone suggest,specification should have binary data in response or how I will consume the api from outsystem.

2023-04-16 15-25-31
Krishnanand Pathak
Solution

Hi @ujwala T
As I can understand, your api response is in binary format right if yes.
Then Change the Response Format to Binary as shown below.


Then set the output with data type Binary Data as shown below




Hope it will help.

Regards

Krishnanand Pathak


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Ujwala,

That really depends a lot on how the REST API you are consuming sends its binary content. In general, these are the three possibilities:

  • Structureless binary data in the body;
  • Base64 encoded binary data in a JSON attribute;
  • Multipart/form-data encoded binary data (typically as a file).

You need to know which of these is supported by the API, before we can tell you how to do it in OutSystems.

UserImage.jpg
ujwala T

Hi kilan,

As got info ,It may be structureless binary data in response,

Can you please suggest how to consume that in outsystems,as the request is there but no response in api specification.


2023-04-16 15-25-31
Krishnanand Pathak
Solution

Hi @ujwala T
As I can understand, your api response is in binary format right if yes.
Then Change the Response Format to Binary as shown below.


Then set the output with data type Binary Data as shown below




Hope it will help.

Regards

Krishnanand Pathak


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.