ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.59k stars 1.33k forks source link

proxy #1

Closed dvv closed 11 years ago

dvv commented 13 years ago

Hi!

Please, consider taking care of those who behind proxies ;) Say, https://github.com/dvv/F/blob/master/lib/wget.js

TIA, --Vladimir

Filirom1 commented 12 years ago

+1

kapouer commented 11 years ago

This gist from @shigeki looks like it ? https://gist.github.com/shigeki/2921169 if he's all right with using it.

anthonyshort commented 11 years ago

^ :+1:

shigeki commented 11 years ago

I'm very surprised that my gist was founded in this issue thread. This patch is for the man who was in trouble to use tower.js inside his proxy. As described in the gist, it needs node-tunnel module for SSL proxy. Please free to use or modify this as you like.

kapouer commented 11 years ago

A second thought about this : it would be easier to have a superagent-proxy module that declares "tunnel" as a dependency, instead of having superagent depend on it directly.

gjohnson commented 11 years ago

Checkout superagent-proxy

PeterDaveHello commented 8 years ago

hmmm ... sorry to comment on an old issue, but I have a question, no offense, can't we just respect the environment variable http_proxy but can only rely on another package? Thanks.

kornelski commented 8 years ago

AFAIK node's own http request handling doesn't automagically pick the proxy, and superagent behaving differently could surprising, so an explicit superagent-proxy call seems like an OK solution to me.