Skip to content

Commit c143d61

Browse files
avivkellermarco-ippolito
authored andcommitted
doc: include ESM import for HTTP
PR-URL: #53165 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
1 parent 260d8d9 commit c143d61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/http.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
77
<!-- source_link=lib/http.js -->
88

9-
To use the HTTP server and client one must `require('node:http')`.
9+
This module, containing both a client and server, can be imported via
10+
`require('node:http')` (CommonJS) or `import * as http from 'node:http'` (ES module).
1011

1112
The HTTP interfaces in Node.js are designed to support many features
1213
of the protocol which have been traditionally difficult to use.

0 commit comments

Comments
 (0)