diff --git a/doc/api/http.md b/doc/api/http.md index 84b72b6e2c1..7b5fc02b69f 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1172,6 +1172,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 @@ -1193,6 +1194,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