I had been tasked with adding an endpoint to my Mule service for verifying other service endpoints. One of the requirements was that the endpoint be HTTP so that a browser could be used to retrieve the verification report.
Originally, when hitting the endpoint in my browser, the resulting HTML was displayed as plain text.I resolved this by adding the HtmlResponseTransformer below:
<http:endpoint name="VerificationEndpoint"It is worth noting the HTTP Transport Documentation states that HTTP endpoints are synchronous by default, but it did appear to be the case in my experience.
<add-message-property key="Content-Type" value="text/html"/>