There are multiple ways to scope variables to keep your saved calls dynamic, but also through the tests tab you can basically run any JS you want.
pm.test("Status code is 200",function(){pm.response.to.have.status(200);});varjsonData=pm.response.json();pm.environment.set("Authorization",jsonData.token_type+' '+jsonData.id_token);
So I can test my responses (good practice!) but also take the response from my OAuth call and automagically set it to my environment variables.
Then, every subsequent actual call just needs to have a header of Authorization: {{Authorization}}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Postman
There are multiple ways to scope variables to keep your saved calls dynamic, but also through the
tests
tab you can basically run any JS you want.So I can test my responses (good practice!) but also take the response from my OAuth call and automagically set it to my environment variables.
Then, every subsequent actual call just needs to have a header of
Authorization: {{Authorization}}