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.
1 parent 6d6000c commit 7894014Copy full SHA for 7894014
docs/tutorial/getting-started/status-and-headers/index.md
@@ -53,6 +53,15 @@ new Elysia()
53
.listen(3000)
54
```
55
56
+The status code can be a number or a string status name. Both of these are equivalent:
57
+
58
+```typescript
59
+status(418, "I'm a teapot")
60
+status("I'm a teapot", "I'm a teapot")
61
+```
62
63
+String status names provide TypeScript autocompletion for all valid HTTP statuses.
64
65
See <DocLink href="/essential/handler#status">Status</DocLink>.
66
67
## Redirect
0 commit comments