Superagent: How to use http proxy?

Created on 11 Apr 2013  路  2Comments  路  Source: visionmedia/superagent

Hello, is there any way to go via http proxy?
Could you give an example?

Most helpful comment

i tried above with Charles Web Debugging Proxy, does not work, any solution? Thanks

All 2 comments

var superagent = require('superagent')
  , host = 'github.com'
  , path = '/visionmedia/superagent/issues/204'
  , proxy = 'http://address:port'; // replace this

superagent
  .agent()
  .get(proxy + path)
  .set('Host', host)
  .end(function(r) {
    // parse result
  });

i tried above with Charles Web Debugging Proxy, does not work, any solution? Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tj picture tj  路  9Comments

tbo picture tbo  路  4Comments

ariemeow picture ariemeow  路  8Comments

djizco picture djizco  路  5Comments

SergioFaya picture SergioFaya  路  5Comments