One of the common issues these days is making requests to third part domains that don't support json and/or jsonp. Please provide an example of this in your demo.
I wrote one that kind of sucks here: https://gist.github.com/864549. 75% of the code is to prevent errors that would crash NodeJS.
Or for XML, User needs to convert this to JSON
This sort of works, obviously its broken b/c I don't rebuild absolute URLs:
However, this one seriously breaks and I don't know why
Seems like this would be best implemented as a standalone library that uses node-http-proxy.
Seriously? I would think this is very important use case. It seems that the major pain for Web Dev's have shifted from IE6 to the horrendous state of same-domain policies. Every JS application needs one a proxy now, and that isn't going to change for some time.
Although I agree with you that this would be a valuable feature, it clearly does not align with this goal. Be happy to contribute / collaborate on the standalone library, but it does not belong in node-http-proxy.
I gotta agree with indexzero on this. A generalized json-p proxy should be a standalone project. If you make a separate module that wraps this functionality up nicely, I'd be glad to link it to the ReadMe for http-proxy.
You guys are making a browser-style 'web proxy' if I understand correctly, I'll be using Node directly rather than building ontop of this http-proxy
Huh? It's a proxy for http requests, not sure how else to explain that.
Either way, best of luck.
node-http-proxy is not designed to run in the browser. It is designed to run on the server using node.js.
It is also designed to compete with things like nginx, and HAProxy. Very heavy C/C++ libraries that are difficult to contribute to or improve without a large upfront effort in learning the codebase and low-level networking approaches.
You really should use node-http-proxy rather than just node.js directly. We do a lot of things that aren't immediately obvious if you're just doing http.request().