Created
June 26, 2017 22:14
-
-
Save bhuizi/e162b9aa575e9a4dadc949dbab717469 to your computer and use it in GitHub Desktop.
super agent example to return cookies
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
const request = require('superagent'); | |
const agent = request.agent(); | |
agent | |
.post(url) | |
.type('form') | |
.send( | |
{ | |
username:"", | |
password:"^,W^.6ck", | |
redirectUrl: "''", | |
sso: "true" | |
}) | |
.then(res => console.log(res.headers)) | |
.catch(err => console.log(err)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment