Ask a Question

Return binary data from file as response in REST mock

SOLVED
rudolfstarosta
New Contributor

Return binary data from file as response in REST mock

Hi,

 

I am trying to create a REST mock service that reads binary data from a file. The mock service needs to send back a HTTP response using just the binary data as content. I do not know the encoding of the binary data. I searched for possible solutions, but I couldn't find any. Can anyone please help me with this issue? Thank you very much in advance.

 

Regards,

Rudolf

3 REPLIES 3
nmrao
Community Hero

Just curious how it is consumed by the receiver?
By the way, are you sending any value to "Accept" header in the request?


Regards,
Rao.

The consumer gets the data as a PDF file. If you know any better way to send a PDF as response to a request please let me know.

 

Here the header I would like to mock:

 

rudolfstarosta_0-1639849399179.png

 

cancel
Showing results for 
Search instead for 
Did you mean: