deno.land / x / hono@v4.2.5 / utils / http-status.ts

http-status.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
export type InfoStatusCode = 100 | 101 | 102 | 103export type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226export type DeprecatedStatusCode = 305 | 306export type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308export type ClientErrorStatusCode = | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451export type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511/** * `UnOfficalStatusCode` can be used to specify an informal status code. * @example * * ```ts * app.get('/', (c) => { * return c.text("hono is cool", 666 as UnOfficalStatusCode) * }) * ``` */export type UnOfficalStatusCode = -1
/** * If you want to use an unofficial status, use `UnOfficalStatusCode`. */export type StatusCode = | InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnOfficalStatusCode
hono

Version Info

Tagged at
a month ago