Access CSRFToken via http-connector Plugin

Hi,

im trying to use the http-connector Plugin inside a Servicetask to make a POST Request.

The Server is using a Basic Authorization including a x-csrf-token for POST Requests.

When I do a GET Request, the Server is sending me in Postman in the Headers two separate Set-Cookie variables. One is the CSRFToken and the other is the Session Key.

I can access the Session key in Camunda via

connector.getVariable(“headers”);

cookies = headers[“Set-Cookie”];

But the CSRFToken (the first Set-Cookie variable) seems to be overwritten by the Session key.

In Postman, when I do a Get Request, i am also getting the Session key and the CSRFToken as Cookies.

Is there any way to access this CSRFToken in Camunda either via Cookies or the Headers?

Many Thanks!