Using your Proxy Account with Node.js

From FoxyProxy Documentation
Revision as of 03:49, 2 December 2015 by Ejung (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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.