diff --git a/doc/api/http.md b/doc/api/http.md index 9b9175a003f56c..576f21440e1ef7 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1139,6 +1139,7 @@ may run into a 'ECONNRESET' error. ```mjs import http from 'node:http'; +const agent = new http.Agent({ keepAlive: true }); // Server has a 5 seconds keep-alive timeout by default http @@ -1160,6 +1161,7 @@ setInterval(() => { ```cjs const http = require('node:http'); +const agent = new http.Agent({ keepAlive: true }); // Server has a 5 seconds keep-alive timeout by default http