doc: include ESM import for HTTP

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Aviv Keller 2024-05-29 20:46:42 -04:00 committed by GitHub
parent bb8d2936ab
commit 78485280ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,8 @@
<!-- source_link=lib/http.js -->
To use the HTTP server and client one must `require('node:http')`.
This module, containing both a client and server, can be imported via
`require('node:http')` (CommonJS) or `import * as http from 'node:http'` (ES module).
The HTTP interfaces in Node.js are designed to support many features
of the protocol which have been traditionally difficult to use.