Skip to content

Instantly share code, notes, and snippets.

@dylang
Created October 6, 2010 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylang/614153 to your computer and use it in GitHub Desktop.
Save dylang/614153 to your computer and use it in GitHub Desktop.
/*
Node 0.2.3
Requesting the https url works most urls - including the following url with invalid username and password.
Normally if the username and password are correct this service forwards to another https page (the dashboard)
I cannot put my real username and password in this gist for obvious reasons.
*/
var request = require('request');
request({uri: 'https://hire.jobvite.com/Login/Login.aspx?UserName=VALIDUSERNAME&Password=VALIDPASS'},
function(err, res, body) {
if (err) { console.log(err.stack); }
else { console.log(body); }
});
/*
Output:
EAFNOSUPPORT, Address family not supported by protocol family
at doConnect (net:821:19)
at Client.connect (net:883:30)
at Client._reconnect (http:994:10)
at Client.request (http:1028:42)
at request (/usr/local/lib/node/.npm/request/0.10.0/package/lib/main.js:62:36)
at IncomingMessage.<anonymous> (/usr/local/lib/node/.npm/request/0.10.0/package/lib/main.js:84:9)
at IncomingMessage.emit (events:41:20)
at HTTPParser.onMessageComplete (http:107:23)
at Client.onData [as ondata] (http:848:27)
at IOWatcher.callback (net:494:29)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment