Skip to content

Commit

Permalink
Add example for using with request
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcg committed Feb 25, 2015
1 parent 8630bc5 commit 47c8ee2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions example/tor-request.js
@@ -0,0 +1,17 @@
'use strict';

/*jshint node:true*/

var request = require('request');

var Agent = require('../lib/Agent');

request({
url: process.argv[2],
agentClass: Agent,
agentOptions: {
socksPort: 9050 // Defaults to 1080.
}
}, function(err, res) {
console.log(res.body);
});

0 comments on commit 47c8ee2

Please sign in to comment.