Created
January 31, 2018 19:09
-
-
Save absk1317/c67c9387092db983cafc60cae2a831e1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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: 'http://localhost:3000/api/v1/users/sign_in', | |
method: 'POST', | |
header: 'content-type:application/json', | |
body: { | |
mode: 'raw', | |
raw: JSON.stringify({ user: { | |
email: '[email protected]', | |
password: "abcdef" | |
}}) | |
} | |
}, function (err, res, xhr) { | |
var token = res.headers.get('authorization'); | |
console.log(token); | |
pm.globals.set("token", token); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment