I'm sending a https request to a third party api and getting back a response of 403. How do I log to the console the request? I want to verify what I'm sending since it works when I curl it. Using Mule 3.7.0
<flow name="EmailFlow" >
<jms:inbound-endpoint queue="outbound.queue" doc:name="email outbound communicationQ" connector-ref="Active_MQ" >
</jms:inbound-endpoint>
<json:object-to-json-transformer doc:name="Object to JSON"/>
<logger message="msg is: #[payload]" level="INFO" doc:name="Logger"/>
<http:request config-ref="https_request_config" path="/api/v1/transmissions" method="POST" doc:name="HTTP">
<http:request-builder>
<http:header headerName="Authorization" value="somekey"/>
<http:header headerName="Content-Type" value="application/json"/>
</http:request-builder>
<http:success-status-code-validator values="403"/>
</http:request>
<logger level="INFO" doc:name="Logger"/>
</flow>
In 3.7 + You can add the following to your log4j2.xml which performs HTTP wire logging:
<AsyncLogger name="org.mule.module.http.internal.HttpMessageLogger" level="DEBUG" />
<AsyncLogger name="com.ning.http" level="DEBUG" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With