diff --git a/doc/api/http.md b/doc/api/http.md index e604509b337..82e42fdc24d 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1171,6 +1171,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 @@ -1192,6 +1193,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