Skip to content

Instantly share code, notes, and snippets.

@jflessau
Last active December 15, 2019 17:25
Show Gist options
  • Select an option

  • Save jflessau/cc0e51b2bf98ad5a6aedd607a5661640 to your computer and use it in GitHub Desktop.

Select an option

Save jflessau/cc0e51b2bf98ad5a6aedd607a5661640 to your computer and use it in GitHub Desktop.
Set environment variable to value from response data in postman.
// this goes into the "test" tab in postman
var response = JSON.parse(responseBody);
postman.setEnvironmentVariable("ENV_VAR_NAME", response.token);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment