-
-
Save dizzyd/e9d4d8eda9b79eab8a78 to your computer and use it in GitHub Desktop.
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
TypeError: Cannot call method 'toLowerCase' of undefined at IncomingMessage._addHeaderLine (http.js:383:17) | |
at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:137:23) | |
at Socket.socketOnData [as ondata] (http.js:1367:20) | |
at TCP.onread (net.js:403:27) | |
TypeError: Cannot call method 'apply' of undefined | |
at Socket.EventEmitter.emit (events.js:126:20) | |
at Socket._destroy.destroyed (net.js:357:10) | |
at process.startup.processNextTick.process._tickCallback (node.js:244:9) |
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 http = require("http") | |
var request = require("request"); | |
var url = "http://short.co/97k9" | |
var headers = {'User-Agent': 'AppleWebKit/525.13 (KHTML, like Gecko) Safari/525.13.', | |
'Connection': 'close'} | |
function run() { | |
request.head({url:url, headers:headers, followRedirect:false}, | |
function(err, res) { | |
JSON.stringify(res); | |
process.nextTick(run); | |
}); | |
} | |
run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment