|
3 | 3 | export const httpStatus = { |
4 | 4 | // Informational responses |
5 | 5 | 100: { |
6 | | - msg: "Continue", |
| 6 | + msg: 'Continue', |
7 | 7 | }, |
8 | 8 | 101: { |
9 | | - msg: "Switching Protocols", |
| 9 | + msg: 'Switching Protocols', |
10 | 10 | }, |
11 | 11 | 102: { |
12 | | - msg: "Processing", |
| 12 | + msg: 'Processing', |
13 | 13 | }, |
14 | 14 | 103: { |
15 | | - msg: "Early Hints", |
| 15 | + msg: 'Early Hints', |
16 | 16 | }, |
17 | 17 | // Successful responses |
18 | 18 | 200: { |
19 | | - msg: "OK", |
| 19 | + msg: 'OK', |
20 | 20 | }, |
21 | 21 | 201: { |
22 | | - msg: "Created", |
| 22 | + msg: 'Created', |
23 | 23 | }, |
24 | 24 | 202: { |
25 | | - msg: "Accepted", |
| 25 | + msg: 'Accepted', |
26 | 26 | }, |
27 | 27 | 203: { |
28 | | - msg: "Non-Authoritative Information", |
| 28 | + msg: 'Non-Authoritative Information', |
29 | 29 | }, |
30 | 30 | 204: { |
31 | | - msg: "No Content", |
| 31 | + msg: 'No Content', |
32 | 32 | }, |
33 | 33 | 205: { |
34 | | - msg: "Reset Content", |
| 34 | + msg: 'Reset Content', |
35 | 35 | }, |
36 | 36 | 206: { |
37 | | - msg: "Partial Content", |
| 37 | + msg: 'Partial Content', |
38 | 38 | }, |
39 | 39 | 207: { |
40 | | - msg: "Multi-Status", |
| 40 | + msg: 'Multi-Status', |
41 | 41 | }, |
42 | 42 | 208: { |
43 | | - msg: "Already Reported", |
| 43 | + msg: 'Already Reported', |
44 | 44 | }, |
45 | 45 | 226: { |
46 | | - msg: "IM Used", |
| 46 | + msg: 'IM Used', |
47 | 47 | }, |
48 | 48 | // Redirection messages |
49 | 49 | 300: { |
50 | | - msg: "Multiple Choices", |
| 50 | + msg: 'Multiple Choices', |
51 | 51 | }, |
52 | 52 | 301: { |
53 | | - msg: "Moved Permanently", |
| 53 | + msg: 'Moved Permanently', |
54 | 54 | }, |
55 | 55 | 302: { |
56 | | - msg: "Found", |
| 56 | + msg: 'Found', |
57 | 57 | }, |
58 | 58 | 303: { |
59 | | - msg: "See Other", |
| 59 | + msg: 'See Other', |
60 | 60 | }, |
61 | 61 | 304: { |
62 | | - msg: "Not Modified", |
| 62 | + msg: 'Not Modified', |
63 | 63 | }, |
64 | 64 | 305: { |
65 | | - msg: "Use Proxy", |
| 65 | + msg: 'Use Proxy', |
66 | 66 | }, |
67 | 67 | 306: { |
68 | | - msg: "unused", |
| 68 | + msg: 'unused', |
69 | 69 | }, |
70 | 70 | 307: { |
71 | | - msg: "Temporary Redirect", |
| 71 | + msg: 'Temporary Redirect', |
72 | 72 | }, |
73 | 73 | 308: { |
74 | | - msg: "Permanent Redirect", |
| 74 | + msg: 'Permanent Redirect', |
75 | 75 | }, |
76 | 76 | // Redirection messages |
77 | 77 | 400: { |
78 | | - msg: "Bad Request", |
| 78 | + msg: 'Bad Request', |
79 | 79 | }, |
80 | 80 | 401: { |
81 | | - msg: "Unauthorized", |
| 81 | + msg: 'Unauthorized', |
82 | 82 | }, |
83 | 83 | 402: { |
84 | | - msg: "Payment Required", |
| 84 | + msg: 'Payment Required', |
85 | 85 | }, |
86 | 86 | 403: { |
87 | | - msg: "Forbidden", |
| 87 | + msg: 'Forbidden', |
88 | 88 | }, |
89 | 89 | 404: { |
90 | | - msg: "Not Found", |
| 90 | + msg: 'Not Found', |
91 | 91 | }, |
92 | 92 | 405: { |
93 | | - msg: "Method Not Allowed", |
| 93 | + msg: 'Method Not Allowed', |
94 | 94 | }, |
95 | 95 | 406: { |
96 | | - msg: "Not Acceptable", |
| 96 | + msg: 'Not Acceptable', |
97 | 97 | }, |
98 | 98 | 407: { |
99 | | - msg: "Proxy Authentication Required", |
| 99 | + msg: 'Proxy Authentication Required', |
100 | 100 | }, |
101 | 101 | 408: { |
102 | | - msg: "Request Timeout", |
| 102 | + msg: 'Request Timeout', |
103 | 103 | }, |
104 | 104 | 409: { |
105 | | - msg: "Conflict", |
| 105 | + msg: 'Conflict', |
106 | 106 | }, |
107 | 107 | 410: { |
108 | | - msg: "Gone", |
| 108 | + msg: 'Gone', |
109 | 109 | }, |
110 | 110 | 411: { |
111 | | - msg: "Length Required", |
| 111 | + msg: 'Length Required', |
112 | 112 | }, |
113 | 113 | 412: { |
114 | | - msg: "Precondition Failed", |
| 114 | + msg: 'Precondition Failed', |
115 | 115 | }, |
116 | 116 | 413: { |
117 | | - msg: "Content Too Large", |
| 117 | + msg: 'Content Too Large', |
118 | 118 | }, |
119 | 119 | 414: { |
120 | | - msg: "URI Too Long", |
| 120 | + msg: 'URI Too Long', |
121 | 121 | }, |
122 | 122 | 415: { |
123 | | - msg: "Unsupported Media Type", |
| 123 | + msg: 'Unsupported Media Type', |
124 | 124 | }, |
125 | 125 | 416: { |
126 | | - msg: "Range Not Satisfiable", |
| 126 | + msg: 'Range Not Satisfiable', |
127 | 127 | }, |
128 | 128 | 417: { |
129 | | - msg: "Expectation Failed", |
| 129 | + msg: 'Expectation Failed', |
130 | 130 | }, |
131 | 131 | 418: { |
132 | 132 | msg: "I'm a teapot", |
133 | 133 | }, |
134 | 134 | 421: { |
135 | | - msg: "Misdirected Request", |
| 135 | + msg: 'Misdirected Request', |
136 | 136 | }, |
137 | 137 | 422: { |
138 | | - msg: "Unprocessable Content", |
| 138 | + msg: 'Unprocessable Content', |
139 | 139 | }, |
140 | 140 | 423: { |
141 | | - msg: "Locked", |
| 141 | + msg: 'Locked', |
142 | 142 | }, |
143 | 143 | 424: { |
144 | | - msg: "Failed Dependency", |
| 144 | + msg: 'Failed Dependency', |
145 | 145 | }, |
146 | 146 | 425: { |
147 | | - msg: "Too Early", |
| 147 | + msg: 'Too Early', |
148 | 148 | }, |
149 | 149 | 426: { |
150 | | - msg: "Upgrade Required", |
| 150 | + msg: 'Upgrade Required', |
151 | 151 | }, |
152 | 152 | 428: { |
153 | | - msg: "Precondition Required", |
| 153 | + msg: 'Precondition Required', |
154 | 154 | }, |
155 | 155 | 429: { |
156 | | - msg: "Too Many Requests", |
| 156 | + msg: 'Too Many Requests', |
157 | 157 | }, |
158 | 158 | 431: { |
159 | | - msg: "Request Header Fields Too Large", |
| 159 | + msg: 'Request Header Fields Too Large', |
160 | 160 | }, |
161 | 161 | 451: { |
162 | | - msg: "Unavailable For Legal Reasons", |
| 162 | + msg: 'Unavailable For Legal Reasons', |
163 | 163 | }, |
164 | 164 | // Server error responses |
165 | 165 | 500: { |
166 | | - msg: "Internal Server Error", |
| 166 | + msg: 'Internal Server Error', |
167 | 167 | }, |
168 | 168 | 501: { |
169 | | - msg: "Not Implemented", |
| 169 | + msg: 'Not Implemented', |
170 | 170 | }, |
171 | 171 | 502: { |
172 | | - msg: "Bad Gateway", |
| 172 | + msg: 'Bad Gateway', |
173 | 173 | }, |
174 | 174 | 503: { |
175 | | - msg: "Service Unavailable", |
| 175 | + msg: 'Service Unavailable', |
176 | 176 | }, |
177 | 177 | 504: { |
178 | | - msg: "Gateway Timeout", |
| 178 | + msg: 'Gateway Timeout', |
179 | 179 | }, |
180 | 180 | 505: { |
181 | | - msg: "HTTP Version Not Supported", |
| 181 | + msg: 'HTTP Version Not Supported', |
182 | 182 | }, |
183 | 183 | 506: { |
184 | | - msg: "Variant Also Negotiates", |
| 184 | + msg: 'Variant Also Negotiates', |
185 | 185 | }, |
186 | 186 | 507: { |
187 | | - msg: "Insufficient Storage", |
| 187 | + msg: 'Insufficient Storage', |
188 | 188 | }, |
189 | 189 | 508: { |
190 | | - msg: "Loop Detected", |
| 190 | + msg: 'Loop Detected', |
191 | 191 | }, |
192 | 192 | 510: { |
193 | | - msg: "Not Extended", |
| 193 | + msg: 'Not Extended', |
194 | 194 | }, |
195 | 195 | 511: { |
196 | | - msg: "Network Authentication Required", |
| 196 | + msg: 'Network Authentication Required', |
197 | 197 | }, |
198 | | -}; |
| 198 | +} |
| 199 | + |
| 200 | +export type HttpStatusCode = keyof typeof httpStatus |
0 commit comments