Created
May 1, 2012 15:26
-
-
Save JakubOboza/2568811 to your computer and use it in GitHub Desktop.
raw request for torrent -> use pump to give it back.
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
var http = require('http'); | |
var torrent = "http://torrents.thepiratebay.se/7232828/Alcatraz.S01E13.HDTV.x264-LOL.7232828.TPB.torrent"; | |
var torrentto = "http://ca.isohunt.com/download/70161921/lol.torrent"; | |
var options = { | |
host: 'torrents.thepiratebay.se', | |
port: 80, | |
path: '/7232828/Alcatraz.S01E13.HDTV.x264-LOL.7232828.TPB.torrent', | |
method: 'GET' | |
}; | |
var optionsto = { | |
host: 'ca.isohunt.com', | |
port: 80, | |
path: '/download/70161921/lol.torrent', | |
method: 'GET' | |
}; | |
var req = http.get(options, function(res) { | |
console.log('STATUS: ' + res.statusCode); | |
console.log('HEADERS: ' + JSON.stringify(res.headers)); | |
res.setEncoding('utf8'); | |
res.on('data', function (chunk) { | |
console.log('BODY: ' + chunk); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment