Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

To Configure Headers

In the HTTP Listener, you can configure a verbose form of the response HTTP headers and status code. You configure two properties:

  • outboundHeadersMapName

    Supports sending custom headers with the response.

  • httpStatusVarName

    Supports sending a custom HTTP status code in the response.

Adding a Header to a Response

Put the header you want to add inside the outboundHeaders map, as shown in the following example:


         
      
1
2
3
4
5
6
7
<ee:transform>
    <ee:set-variables>
    <ee:set-variable name="outboundHeaders">
        variables.outboundHeaders ++{headerName:"value"}
    </ee:set-variable>
</ee:set-variables>
</ee:transform>