Details
-
Task
-
Status: Done
-
To be reviewed
-
Resolution: Done
-
None
-
None
-
Security Level: Public
-
0
-
Mule 4 - X-Wing 01/16
Description
Dynamic HTTP requests are very hard to troubleshoot, as the actual configuration at the time of the request is not visible.
Example dynamic HTTP request:
<http:request-config name="HTTP_Request_Configuration" host="#[flowVars['configObject']['config']['service']['http_host']]" port="#[flowVars['configObject']['config']['service']['http_port']]" doc:name="HTTP Request Configuration" protocol="HTTPS" doc:description="HTTP Request"/>
An alternative is to enable wire logging, and inspect the host header, however wire logging could be too verbose and the host header could be overridden by the application.
We need to add a DEBUG logger that prints the resolved host and port before executing a dynamic HTTP request.
Example expected output:
HTTP Request, config "HTTP_Request_Configuration", host: "www.myhost.com", port: 443