Difference between revisions of "Using your Proxy Account with Node.js"

From FoxyProxy Documentation
Jump to: navigation, search
(Created page with " <nowiki>var request = require('request'); request({'url':'http://icanhazip.com', 'proxy':'http://formshunt:verifybred@mutefish.getfoxyproxy.org:3128'}, function (erro...")

Revision as of 03:49, 2 December 2015

var request = require('request');
request({'url':'http://icanhazip.com',
        'proxy':'http://formshunt:verifybred@mutefish.getfoxyproxy.org:3128'}, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
    else console.log("error");
});

More info about the request module in Node.js, including how to install it.