Skip to content

Commit c391923

Browse files
avivkellertargos
authored andcommitted
doc: include ESM import for HTTP
PR-URL: #53165 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
1 parent 1886fe9 commit c391923

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)