Skip to content

Commit dba2557

Browse files
committed
u
1 parent ef15933 commit dba2557

1 file changed

Lines changed: 65 additions & 63 deletions

File tree

src/http-status.ts

Lines changed: 65 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,196 +3,198 @@
33
export const httpStatus = {
44
// Informational responses
55
100: {
6-
msg: "Continue",
6+
msg: 'Continue',
77
},
88
101: {
9-
msg: "Switching Protocols",
9+
msg: 'Switching Protocols',
1010
},
1111
102: {
12-
msg: "Processing",
12+
msg: 'Processing',
1313
},
1414
103: {
15-
msg: "Early Hints",
15+
msg: 'Early Hints',
1616
},
1717
// Successful responses
1818
200: {
19-
msg: "OK",
19+
msg: 'OK',
2020
},
2121
201: {
22-
msg: "Created",
22+
msg: 'Created',
2323
},
2424
202: {
25-
msg: "Accepted",
25+
msg: 'Accepted',
2626
},
2727
203: {
28-
msg: "Non-Authoritative Information",
28+
msg: 'Non-Authoritative Information',
2929
},
3030
204: {
31-
msg: "No Content",
31+
msg: 'No Content',
3232
},
3333
205: {
34-
msg: "Reset Content",
34+
msg: 'Reset Content',
3535
},
3636
206: {
37-
msg: "Partial Content",
37+
msg: 'Partial Content',
3838
},
3939
207: {
40-
msg: "Multi-Status",
40+
msg: 'Multi-Status',
4141
},
4242
208: {
43-
msg: "Already Reported",
43+
msg: 'Already Reported',
4444
},
4545
226: {
46-
msg: "IM Used",
46+
msg: 'IM Used',
4747
},
4848
// Redirection messages
4949
300: {
50-
msg: "Multiple Choices",
50+
msg: 'Multiple Choices',
5151
},
5252
301: {
53-
msg: "Moved Permanently",
53+
msg: 'Moved Permanently',
5454
},
5555
302: {
56-
msg: "Found",
56+
msg: 'Found',
5757
},
5858
303: {
59-
msg: "See Other",
59+
msg: 'See Other',
6060
},
6161
304: {
62-
msg: "Not Modified",
62+
msg: 'Not Modified',
6363
},
6464
305: {
65-
msg: "Use Proxy",
65+
msg: 'Use Proxy',
6666
},
6767
306: {
68-
msg: "unused",
68+
msg: 'unused',
6969
},
7070
307: {
71-
msg: "Temporary Redirect",
71+
msg: 'Temporary Redirect',
7272
},
7373
308: {
74-
msg: "Permanent Redirect",
74+
msg: 'Permanent Redirect',
7575
},
7676
// Redirection messages
7777
400: {
78-
msg: "Bad Request",
78+
msg: 'Bad Request',
7979
},
8080
401: {
81-
msg: "Unauthorized",
81+
msg: 'Unauthorized',
8282
},
8383
402: {
84-
msg: "Payment Required",
84+
msg: 'Payment Required',
8585
},
8686
403: {
87-
msg: "Forbidden",
87+
msg: 'Forbidden',
8888
},
8989
404: {
90-
msg: "Not Found",
90+
msg: 'Not Found',
9191
},
9292
405: {
93-
msg: "Method Not Allowed",
93+
msg: 'Method Not Allowed',
9494
},
9595
406: {
96-
msg: "Not Acceptable",
96+
msg: 'Not Acceptable',
9797
},
9898
407: {
99-
msg: "Proxy Authentication Required",
99+
msg: 'Proxy Authentication Required',
100100
},
101101
408: {
102-
msg: "Request Timeout",
102+
msg: 'Request Timeout',
103103
},
104104
409: {
105-
msg: "Conflict",
105+
msg: 'Conflict',
106106
},
107107
410: {
108-
msg: "Gone",
108+
msg: 'Gone',
109109
},
110110
411: {
111-
msg: "Length Required",
111+
msg: 'Length Required',
112112
},
113113
412: {
114-
msg: "Precondition Failed",
114+
msg: 'Precondition Failed',
115115
},
116116
413: {
117-
msg: "Content Too Large",
117+
msg: 'Content Too Large',
118118
},
119119
414: {
120-
msg: "URI Too Long",
120+
msg: 'URI Too Long',
121121
},
122122
415: {
123-
msg: "Unsupported Media Type",
123+
msg: 'Unsupported Media Type',
124124
},
125125
416: {
126-
msg: "Range Not Satisfiable",
126+
msg: 'Range Not Satisfiable',
127127
},
128128
417: {
129-
msg: "Expectation Failed",
129+
msg: 'Expectation Failed',
130130
},
131131
418: {
132132
msg: "I'm a teapot",
133133
},
134134
421: {
135-
msg: "Misdirected Request",
135+
msg: 'Misdirected Request',
136136
},
137137
422: {
138-
msg: "Unprocessable Content",
138+
msg: 'Unprocessable Content',
139139
},
140140
423: {
141-
msg: "Locked",
141+
msg: 'Locked',
142142
},
143143
424: {
144-
msg: "Failed Dependency",
144+
msg: 'Failed Dependency',
145145
},
146146
425: {
147-
msg: "Too Early",
147+
msg: 'Too Early',
148148
},
149149
426: {
150-
msg: "Upgrade Required",
150+
msg: 'Upgrade Required',
151151
},
152152
428: {
153-
msg: "Precondition Required",
153+
msg: 'Precondition Required',
154154
},
155155
429: {
156-
msg: "Too Many Requests",
156+
msg: 'Too Many Requests',
157157
},
158158
431: {
159-
msg: "Request Header Fields Too Large",
159+
msg: 'Request Header Fields Too Large',
160160
},
161161
451: {
162-
msg: "Unavailable For Legal Reasons",
162+
msg: 'Unavailable For Legal Reasons',
163163
},
164164
// Server error responses
165165
500: {
166-
msg: "Internal Server Error",
166+
msg: 'Internal Server Error',
167167
},
168168
501: {
169-
msg: "Not Implemented",
169+
msg: 'Not Implemented',
170170
},
171171
502: {
172-
msg: "Bad Gateway",
172+
msg: 'Bad Gateway',
173173
},
174174
503: {
175-
msg: "Service Unavailable",
175+
msg: 'Service Unavailable',
176176
},
177177
504: {
178-
msg: "Gateway Timeout",
178+
msg: 'Gateway Timeout',
179179
},
180180
505: {
181-
msg: "HTTP Version Not Supported",
181+
msg: 'HTTP Version Not Supported',
182182
},
183183
506: {
184-
msg: "Variant Also Negotiates",
184+
msg: 'Variant Also Negotiates',
185185
},
186186
507: {
187-
msg: "Insufficient Storage",
187+
msg: 'Insufficient Storage',
188188
},
189189
508: {
190-
msg: "Loop Detected",
190+
msg: 'Loop Detected',
191191
},
192192
510: {
193-
msg: "Not Extended",
193+
msg: 'Not Extended',
194194
},
195195
511: {
196-
msg: "Network Authentication Required",
196+
msg: 'Network Authentication Required',
197197
},
198-
};
198+
}
199+
200+
export type HttpStatusCode = keyof typeof httpStatus

0 commit comments

Comments
 (0)