Hello,
I am trying to chain some requests together by copying some data from an API call into the environment variables, using tests
I have written the following test. The first retrives a value from the JSON response body. this is working as expected.
The response header value however does not work.
This is the test I have written and below is a screenshot showing the test, the response header and the variables logged in the console
var jsonData = JSON.parse(responseBody);
pm.environment.set("form_instance_id", jsonData.id);
var resHeaders = pm.response.headers.get('Etag');
pm.environment.set("eTag", resHeaders.Etag);
Thanks in advance for your assistance.
Ben