![]() |
VOOZH | about |
The http.ClientRequest.reusedSocket is an inbuilt application programming interface of class ClientRequest within the HTTP module which is used to check if the request is sent through a reused socket.
Syntax:
const request.reusedSocket
Parameters: This property does not accept any argument as a parameter.
Return Value: This property returns the object of the client request-host.
Example 1: Filename-index.js
Run the index.js file using the following command:
node index.js
Output:
message is not sent through reusedSocket
Example 2: Filename-index.js
Run the index.js file using the following command:
node index.js
Output:
message is not sent through reusedSocket
Reference: https://nodejs.org/dist/latest-v12.x/docs/api/http.html#http_request_reusedsocket