Created
December 1, 2014 21:36
-
-
Save cianclarke/21aacdd06f22d33e663c to your computer and use it in GitHub Desktop.
Form Data
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
var request = require('request'), | |
jsdom = require('jsdom'), | |
jar = request.jar(), // stores cookies in the "jar", we can re-use them in future authenticated requests | |
// A closure function to enclose our code within | |
(function(username, password){ | |
request.post({ | |
url : 'https://testing.feedhenry.me/box/srv/1.1/act/sys/auth/login', | |
jar : jar, | |
form : { | |
u : username, | |
p : password, | |
d : "testing" | |
}, | |
}, function(err, res, body){ | |
if (err){ | |
console.error(err); | |
return; | |
} | |
}); | |
})("[email protected]", "Blogpost123"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment