Chris911 / Ask-Stack-Atom

Ask Stack Overflow for Atom
https://atom.io/packages/ask-stack
MIT License
124 stars 22 forks source link

Added proxy support and more verbose error logging. #10

Closed pkazmier closed 10 years ago

pkazmier commented 10 years ago

If a user has defined http_proxy environment variable, then set the corresponding proxy option in the HTTP request. This allows users behind a proxy server to use this package.

In addition, added more verbose error logging by including the HTTP response object, res, in the console output. While testing this new functionality, I encountered an error from stack exchange due to rate limiting of requests coming from the corporate proxy server. This was only apparent after examining the HTTP response object, which contained the true reason for failure, so I've now included the response object in the console logging.

Chris911 commented 10 years ago

Looks good! I'll merge when I get home and can test this quickly.

Thanks for your contribution :+1:

pkazmier commented 10 years ago

Thanks for writing the package. It's very handy to be able to review stackexchange while working in the editor. Good stuff (especially now that I can use it at work!).

Chris911 commented 10 years ago

Still works fine here and if you're telling me it now works with your entreprise proxy that's great!

:shipit: