/n software Connectors for MuleSoft

Questions / Feedback?

ResponseBody Property

The response body to be sent to the client.

Data Type

String

Default Value

""

Remarks

This property holds the response body that may be assigned to the HTTP response.

In a typical scenario a HTTP listener is used to receive the original request and send the response because the connector does not have a webserver of its own. The connector will process the request and generate the response, but will rely on the HTTP Listener to relay the response back to the client. In order to configure the HTTP Listener to relay the response to the client, follow the below steps.

In the Mule HTTP Listener's Responses section set the Body to #[attributes.ResponseBody]. Then, add a new header with value 'Content-Type' and value attributes.ResponseHeaders.'Content-Type'.

The corresponding Configuration XML may look like:


<http:response >
				<http:body ><![CDATA[#[attributes.ResponseBody]]]></http:body>
				<http:headers ><![CDATA[#[output applicaton/java
---
{
	"Content-Type" : attributes.ResponseHeaders.'Content-Type'
}]]]></http:headers>
</http:response>

This property is not available in the Sender.

Copyright (c) 2022 /n software inc. - All rights reserved.
/n software Connectors for MuleSoft - Version 20.0 [Build 8318]