Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3458

Adapter REST - change response content-type

$
0
0

Hi experts, we have a special requirement in our project which the sender REST adapter has to send a PDF file in the response payload.


To achieve this, we've developed a java module to get the base64 string content from the payload and transform it into a byte[], and we've changed the payload data as follows:


payload.setContentType("application/pdf");
payload.setContent(bytes);


But when we call the service in the browser or any other client, we realized that the content-type in the response still "application/json".


Does anyone has tried to change the content-type for the adapter REST before? Is this kind of operation allowed in adapter REST?

 

Thank you for the help.

 

Rgds. Raphael

 



Viewing all articles
Browse latest Browse all 3458


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>