Last active
April 16, 2019 15:19
-
-
Save dariayermolova/4fdb8b9bb827cfb4b96c4a7a5d5a1382 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pm.sendRequest({ | |
url: "<host>/api/sign_in", | |
method: 'POST', | |
header: 'Content-Type:application/json', | |
body: { | |
mode: 'raw', | |
raw: JSON.stringify({ | |
"email": pm.environment.get("user_email"), | |
"password": pm.environment.get("user_password") | |
}) | |
} | |
}, function (err, response) { | |
if (response) { | |
pm.environment.set("access_token_header", response.headers.get('access-token')); | |
pm.environment.set("client_header", response.headers.get('client')); | |
pm.environment.set("expiry_header", response.headers.get('expiry')); | |
pm.environment.set("uid_header", response.headers.get('uid')); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment