feross / simple-get

Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines
MIT License
401 stars 50 forks source link

urlToOpts should include protocol to support simply getting https #1

Closed faeldt closed 9 years ago

faeldt commented 9 years ago

urlToOpts is not including protocol so

get('https://myurl.com',
        function(err, getResponse) {

did not work since it was still trying http.

feross commented 9 years ago

Thanks for the PR!

I knew I should have added an https test along with the rest of the tests. :) Rectified in https://github.com/feross/simple-get/commit/816341f5b3e1075674744cfd5ae27a889db0d085

Released as 1.1.0.

faeldt commented 9 years ago

Np. I wasn't sure how to make a test for https so I appreciate the lesson in the linked commit. :)

feross commented 9 years ago

Yeah, it's slightly more annoying which is why I originally skipped it ;) On Mon, Jan 5, 2015 at 3:41 AM Kristian Faeldt notifications@github.com wrote:

Np. I wasn't sure how to make a test for https so I appreciate the lesson in the linked commit. :)

— Reply to this email directly or view it on GitHub https://github.com/feross/simple-get/pull/1#issuecomment-68697722.