We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f7462aa + 2954d2f commit d1ed460Copy full SHA for d1ed460
specs/server-functionality/fetch.md
@@ -0,0 +1,20 @@
1
+# `fetch`
2
+
3
+Perform an HTTP request server-side. It follows the [DOM
4
+`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
5
+argument structure.
6
7
+## Examples
8
9
+```js
10
+// a simple GET request
11
+const response = await manager.fetch('https://api.example.com/api');
12
+const result = await response.json();
13
+```
14
15
16
+await manager.fetch("https://api.example.com/api", {
17
+ method: "POST",
18
+ body: JSON.stringify({ data: "my data" }),
19
+});
20
0 commit comments