Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Use node-request to handle requests ? #158

nojhamster opened this Issue Oct 2, 2013 · 1 comment


None yet
2 participants

I am currently trying to authenticate to github behind a http proxy (using https://github.com/jaredhanson/passport-github), and that requires a https-over-http tunnel.

So why node-request ?
Using node-request would relieve node-oauth of connection matters like which node library to use, or how to deal with proxies. Giving an URI and optionally a proxy address, it manages himself to choose the right protocol and use tunneling if possible.

So at first implementing node-request would facilitate requests, and as a second step that would make it easier to implement proxy support, using the HTTP_PROXY and HTTPS_PROXY environment variables (similarly to #102) and an optionnal parameter in the constructor.

Note that node-request also supports proxies with basic auth. (could help fixing #52)

kerphi commented Oct 6, 2013

I agree ! Using node-request would be a better choice than using the native nodejs http client.
I think also that node-request could also simplify the code in some case cause by default it handles automaticaly HTTP redirections. And its http(s) proxy handling is valuable !

Moreover, node-request is on of the most popular http client in the nodejs world so it's a good choice for sustainability.

So I personaly love to see node-request used by this so central node-oauth module.
+1 for a node-request replacement in node-oauth !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment