Skip to content

Commit

Permalink
doc: include ESM import for HTTP
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
OnlyAviv authored and targos committed Jun 1, 2024
1 parent 1886fe9 commit c391923
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c391923

Please sign in to comment.