Skip to content
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.

The API Docs @ HTTP.request and HTTP.get #157

Open
jackzzjack opened this issue Jul 23, 2015 · 1 comment
Open

The API Docs @ HTTP.request and HTTP.get #157

jackzzjack opened this issue Jul 23, 2015 · 1 comment
Labels

Comments

@jackzzjack
Copy link

There is an error event with http.request and http.get. But the API Docs do not mention it.

More detail about error event.

@fhemberger
Copy link
Contributor

https://nodejs.org/api/http.html#http_http_request_options_callback

If any error is encountered during the request (be that with DNS resolution, TCP level errors, or actual HTTP parse errors) an 'error' event is emitted on the returned request object.

And the example code for http.request and http.get both show the usage of the error event. But as http.request() returns an instance of the http.ClientRequest class, the 'error' event should be listed with the other events as well.

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

No branches or pull requests

3 participants
@fhemberger @jackzzjack and others