I'm executing a post call which returns a list of headers. One of those headers is called "Bunny-id" and returns a number. (Let's suppose Bunny-id --> 159).
I'm trying to take that number and paste it automatically to my environment..Environment var is already there and it's called "id_pratica_artoo", here's the code:
pm.test("set environment variable for chain", function() {
var headerData = pm.response.headers;
pm.environment.set('id_pratica_artoo', headerData.Bunny-id);
});
Executing the POST call with the above test gets me the following error:
set environment variable for chain | ReferenceError: id is not defined
What am I missing?