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 <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>
  • Loading branch information
RedYetiDev authored and marco-ippolito committed Jul 19, 2024
1 parent 260d8d9 commit c143d61
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 c143d61

Please sign in to comment.