How to send byte array in body

Dear Team,

We want to transfer byte array from POSTMAN to an API. We are transferring it into body and it is treating like a string.

How we can transfer a byte array from POSTMAN?

Your prompt response will be appreciated.

Hi @lavishsahu,

Can you please try to send base64 encoded string of your byte array in body of postman. And keep the content type as requested by your target application.

Hope this helps :blush:

@pranavdavar Thanks for update. Could you please let me know, how to define content type in body. My end API is expecting byte array only.

If possible can you please share http headers accepted by your api once.

we have given โ€œContent-Typeโ€, โ€œimage/pngโ€ , still it is treating this input as string.

Hi @lavishsahu ,

There is option to change type in postman body to binary. Can you please try that.

when we are trying to choose binary there is an option of selecting files. In our scenario, we only have option to sent files in some parameter. We donโ€™t have option to select files in our code.