views:

64

answers:

3

I want to make an outgoing HTTP call from node.js, using the standard http.Client. But I cannot reach the remote server directly from my network and need to go through a proxy.

How do I tell node.js to use the proxy?

A: 

Well, you may want to consider setting up a proxy in a cloud some where?

It is a fairly easy to write up a PHP page with curl that will serve as a proxy.

MathGladiator
I don't need to set up a proxy. There already is a proxy that I have to use in order to reach any hosts outside of my local network. The question is how to tell http.Client to use a proxy instead of trying to connect to the remote host directly.
Christian Berg
A: 

May not be the exact one-liner you were hoping for but you could have a look at http://github.com/nodejitsu/node-http-proxy as that may shed some light on how you can use your app with http.Client.

dryprogrammers