How to consume REST API with input as file

Hi Community,

I have REST API to consume. I need to send 3 parameters in header and 2 parameters in body.

Header part is ok.

In body first variable is body_input and I need to give large amount of JSON data there and second variable I need to provide input as file type.

Please advice how should I consume this REST API.

Thanks and Regards,

Suraj Borade 

Hi Suraj,

As per my understanding you need to send file data(large data) to as second input parameter ?


Hi Shashi,

In first input parameter I am sending large data of json type and in second parameter I am sending PDF file.

Hi Suraj,

Need to convert binary from PDF then you can assign binary data into second parameter.



Thanks but I am getting problems while consuming only and this is not I am looking for.

Hi Suraj,

A "file" is not a JSON or REST data type, it's just a binary object. Binary data can be transferred by using a structure attribute with type Binary. (But given your other post, I assume you have larger problems with this REST service.)