ethanent / phin

Node HTTP client
MIT License
576 stars 33 forks source link

HTTP proxy support #28

Closed julianxhokaxhiu closed 5 years ago

julianxhokaxhiu commented 6 years ago

Hi,

another missing feature I noticed missing, compared to require, is the support for HTTP proxy. The best would be to auto detect it based on environment variables and/or also as an option when calling phin.

What do you think? Are you interested in implementing it?

Best regards, Julian

julianxhokaxhiu commented 6 years ago

I was looking at some docus around and would be also awesome if you could provide an option to pass an Agent to the HTTP request. Then I would be able to autonomously pass an Agent done with https://www.npmjs.com/package/proxy-agent

ethanent commented 5 years ago

✔️ phin 3.3.0 adds this functionality!

await p({
   'url': 'https://ethanent.me',
   'core': {
      'agent': myAgent // Assuming you'd previously created Agent myAgent
   }
})

Thank you for your suggestion. 😄

julianxhokaxhiu commented 5 years ago

Thanks, appreciated :)