We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Response
1 parent a5017b2 commit ee38214Copy full SHA for ee38214
content/tutorial/02-sveltekit/05-api-routes/01-get-handlers/README.md
@@ -12,7 +12,9 @@ export function GET() {
12
const number = Math.ceil(Math.random() * 6);
13
14
return new Response(number, {
15
- 'Content-Type': 'application/json'
+ headers: {
16
+ 'Content-Type': 'application/json'
17
+ }
18
});
19
}
20
```
@@ -29,7 +31,9 @@ export function GET() {
29
31
30
32
33
--- return new Response(number, {
34
35
36
37
});---
38
+++ return json(number);+++
39
0 commit comments