Logging request and response messages in http-connector

Hi,
I have configured a connector to make a REST call and I would log the request and response payloads for our support team. How can I accomplish this?

Thanks.

Hi Mike,

One idea which comes to mind…

Logging the response can be easy with a script in the connector config. Hence in your script you get access to the response object and can log whatever, In addition you can extract the relevant parts from the response and store the parts as process variables.

Likewise for the request. If you assemble the payload as a script, you could log from the script.

regards

Rob

Hi Mike,

as the Camunda Connector uses the Apache HTTP Client you can also use its logging configuration (see docs). But than the log would be part of the server log and not saved in the process. Not sure if this is suitable for your use case.

Cheers,
Sebastian

Hi Mike,

I found using Input mapping creates a local scoped variable which is visible in the history view. However, beware large payloads, if you use a STring type, the history database defaults to 4000 char max size. Hence for larger payloads make sure you use an Object such as SPIN JSON type which are stored separately s byte arrays.

regards

Rob