@Dino-at-Google @Sai Saran Vaidyanathan @Siddharth Barahalikar
I am trying to set the content type in java callout. I am able to set the response using
messageContext.getMessage().setContent(variableName);
But I am not able to set the content type to application/json. tried using the following methods but no luck.
messageContext.getMessage().setcontentType("application/json");
also tried these methods
Can you plz help me on how to set the content type
May I know how to identify the methods supported in getMessage().
The documentation (javadoc) is here.
I think you can use
messageContext.setVariable("message.header.content-type", "application/json");
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 |