Skip to content

Conversation

mscdex
Copy link
Contributor

@mscdex mscdex commented Aug 26, 2016

No description provided.

@mreinstein
Copy link
Collaborator

mreinstein commented Aug 26, 2016

thanks Brian. Curious, why http.Agent ? The docs indicate http.request is the sanctioned replacement:

https://nodejs.org/dist/latest-v6.x/docs/api/http.html#http_http_createclient_port_host

@mscdex
Copy link
Contributor Author

mscdex commented Aug 26, 2016

I was being a bit more strict in the replacement since the http.Client constructor created its own http.Agent instance. http.request() uses a global Agent instance by default that is shared by all http.request() calls.

Either way it's up to you what you want to use, if you feel http.request() without creating an explicit http.Agent instance is good enough in this particular case, then feel free to use that instead of this PR. At the very least you can view this PR as a heads up that the deprecated http client API may be removed in the near future (nodejs/node#8104).

@mreinstein mreinstein merged commit 0e16e2e into caolan:master Aug 26, 2016
@mreinstein
Copy link
Collaborator

ok sounds quite reasonable. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants