June 2014
Intermediate to advanced
696 pages
38h 52m
English
The ClientRequest object is created internally when you call http.request() when building an HTTP client. This object is intended to represent the request while it is in progress to the server. You use the ClientRequest object to initiate, monitor, and handle the response from the server.
The ClientRequest object implements a Writable stream, so it provides all the functionality of a Writable stream object. For example, you can use the write() method to write to the ClientRequest object as well as pipe a Readable stream into it.
To implement a ClientRequest object, you use a call to http.request(), with the following syntax:
http.request(options, callback)
The options parameter is an ...
Read now
Unlock full access