Skip to content

Instantly share code, notes, and snippets.

@bhuizi
Created June 26, 2017 22:14
Show Gist options
  • Save bhuizi/e162b9aa575e9a4dadc949dbab717469 to your computer and use it in GitHub Desktop.
Save bhuizi/e162b9aa575e9a4dadc949dbab717469 to your computer and use it in GitHub Desktop.
super agent example to return cookies
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