aboutsummaryrefslogtreecommitdiff
path: root/docs/api/http.md
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-04-13 18:26:45 -0700
committerGravatar GitHub <noreply@github.com> 2023-04-13 18:26:45 -0700
commit011e157cac7698050370e24495a9002dacfceea9 (patch)
treeebb561dbda3e8f67302cc4d5b398f4a2744f7884 /docs/api/http.md
parent0cc56e8efce9c7d4905b3649827bf9b40a677b25 (diff)
downloadbun-011e157cac7698050370e24495a9002dacfceea9.tar.gz
bun-011e157cac7698050370e24495a9002dacfceea9.tar.zst
bun-011e157cac7698050370e24495a9002dacfceea9.zip
Docs restructuring (#2638)
* Restructure * Update nav * Reorg * Reshuffle ecosystem pages * Split up runtime/runtime * Back to runtime/index * Fix issue * Split up runtime/index * Add Writing Tests page * Prettier matcher table * More updates
Diffstat (limited to 'docs/api/http.md')
-rw-r--r--docs/api/http.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/api/http.md b/docs/api/http.md
index 3e11299dd..3ebdafab9 100644
--- a/docs/api/http.md
+++ b/docs/api/http.md
@@ -1,8 +1,8 @@
{% callout %}
-**Note** — This page documents the `Bun.serve` API. This API is heavily optimized and represents the recommended way to build HTTP servers in Bun. Existing Node.js projects may use Bun's [nearly complete](/docs/ecosystem/nodejs#node_http) implementation of the Node.js [`http`](https://nodejs.org/api/http.html) and [`https`](https://nodejs.org/api/https.html) modules.
+**Note** — This page documents the `Bun.serve` API. This API is heavily optimized and represents the recommended way to build HTTP servers in Bun. Existing Node.js projects may use Bun's [nearly complete](/docs/runtime/nodejs-apis#node_http) implementation of the Node.js [`http`](https://nodejs.org/api/http.html) and [`https`](https://nodejs.org/api/https.html) modules.
{% /callout %}
-## Send a request
+## Send a request (`fetch()`)
Bun implements the Web `fetch` API for making HTTP requests. The `fetch` function is available in the global scope.
@@ -13,7 +13,7 @@ console.log(result.icons[0].src);
// => "/logo-square.jpg"
```
-## Start a server
+## Start a server (`Bun.serve()`)
Start an HTTP server in Bun with `Bun.serve`.