Skip to content

Instantly share code, notes, and snippets.

View masum-islam84's full-sized avatar

Masum Islam masum-islam84

View GitHub Profile
@victoroliveirab
victoroliveirab / script.js
Created February 26, 2020 15:04
Postman Pre-Request Script
// Adapted from:
// https://www.nicolaswidart.com/blog/automatically-set-authentication-tokens-in-postman-requests
var requiredAuthPath = pm.environment.get('requiredAuthPath');
var authServicePath = pm.environment.get('authServicePath');
var gatewayBaseUrl = pm.environment.get('gatewayBaseUrl');
var username = pm.environment.get('username');
var password = pm.environment.get('password');
var sdk = require('postman-collection');