forked from oakserver/oak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.d.ts
64 lines (60 loc) · 1.66 KB
/
types.d.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
59
60
61
62
63
64
// Copyright 2018-2020 the oak authors. All rights reserved. MIT license.
import { Status } from "./deps.ts";
/** A HTTP status that is an error (4XX and 5XX). */
export type ErrorStatus =
| Status.BadRequest
| Status.Unauthorized
| Status.PaymentRequired
| Status.Forbidden
| Status.NotFound
| Status.MethodNotAllowed
| Status.NotAcceptable
| Status.ProxyAuthRequired
| Status.RequestTimeout
| Status.Conflict
| Status.Gone
| Status.LengthRequired
| Status.PreconditionFailed
| Status.RequestEntityTooLarge
| Status.RequestURITooLong
| Status.UnsupportedMediaType
| Status.RequestedRangeNotSatisfiable
| Status.ExpectationFailed
| Status.Teapot
| Status.MisdirectedRequest
| Status.UnprocessableEntity
| Status.Locked
| Status.FailedDependency
| Status.UpgradeRequired
| Status.PreconditionRequired
| Status.TooManyRequests
| Status.RequestHeaderFieldsTooLarge
| Status.UnavailableForLegalReasons
| Status.InternalServerError
| Status.NotImplemented
| Status.BadGateway
| Status.ServiceUnavailable
| Status.GatewayTimeout
| Status.HTTPVersionNotSupported
| Status.VariantAlsoNegotiates
| Status.InsufficientStorage
| Status.LoopDetected
| Status.NotExtended
| Status.NetworkAuthenticationRequired;
/** A HTTP status that is a redirect (3XX). */
export type RedirectStatus =
| Status.MultipleChoices // 300
| Status.MovedPermanently // 301
| Status.Found // 302
| Status.SeeOther // 303
| Status.UseProxy // 305 - DEPRECATED
| Status.TemporaryRedirect // 307
| Status.PermanentRedirect; // 308
export type HTTPMethods =
| "HEAD"
| "OPTIONS"
| "GET"
| "PUT"
| "PATCH"
| "POST"
| "DELETE";