@sapphire/plugin-api 3.0.2 → 3.0.3-next.13bb97b.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,382 +1,382 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HttpCodes = void 0;
4
4
  var HttpCodes;
5
5
  (function (HttpCodes) {
6
- /**
7
- * Standard response for successful HTTP requests. The actual response will
8
- * depend on the request method used. In a GET request, the response will
9
- * contain an entity corresponding to the requested resource. In a POST
10
- * request, the response will contain an entity describing or containing the
11
- * result of the action.
12
- */
13
- HttpCodes[(HttpCodes['OK'] = 200)] = 'OK';
14
- /**
15
- * The request has been fulfilled, resulting in the creation of a new
16
- * resource.
17
- */
18
- HttpCodes[(HttpCodes['Created'] = 201)] = 'Created';
19
- /**
20
- * The request has been accepted for processing, but the processing has not
21
- * been completed. The request might or might not be eventually acted upon,
22
- * and may be disallowed when processing occurs.
23
- */
24
- HttpCodes[(HttpCodes['Accepted'] = 202)] = 'Accepted';
25
- /**
26
- * The server is a transforming proxy (e.g. a Web accelerator) that received
27
- * a 200 OK from its origin, but is returning a modified version of the
28
- * origin's response.
29
- */
30
- HttpCodes[(HttpCodes['NonAuthoritativeInformation'] = 203)] = 'NonAuthoritativeInformation';
31
- /**
32
- * The server successfully processed the request, and is not returning any
33
- * content.
34
- */
35
- HttpCodes[(HttpCodes['NoContent'] = 204)] = 'NoContent';
36
- /**
37
- * The server successfully processed the request, asks that the requester
38
- * reset its document view, and is not returning any content.
39
- */
40
- HttpCodes[(HttpCodes['ResetContent'] = 205)] = 'ResetContent';
41
- /**
42
- * (RFC 7233) The server is delivering only part of the resource (byte
43
- * serving) due to a range header sent by the client. The range header is
44
- * used by HTTP clients to enable resuming of interrupted downloads, or
45
- * split a download into multiple simultaneous streams.
46
- */
47
- HttpCodes[(HttpCodes['PartialContent'] = 206)] = 'PartialContent';
48
- /**
49
- * (WebDAV; RFC 4918) The message body that follows is by default an XML
50
- * message and can contain a number of separate response codes, depending on
51
- * how many sub-requests were made.
52
- */
53
- HttpCodes[(HttpCodes['MultiStatus'] = 207)] = 'MultiStatus';
54
- /**
55
- * (WebDAV; RFC 5842) The members of a DAV binding have already been
56
- * enumerated in a preceding part of the (multistatus) response, and are not
57
- * being included again.
58
- */
59
- HttpCodes[(HttpCodes['AlreadyReported'] = 208)] = 'AlreadyReported';
60
- /**
61
- * (RFC 3229) The server has fulfilled a request for the resource, and the
62
- * response is a representation of the result of one or more
63
- * instance-manipulations applied to the current instance.
64
- */
65
- HttpCodes[(HttpCodes['IMUsed'] = 226)] = 'IMUsed';
66
- /**
67
- * Indicates multiple options for the resource from which the client may
68
- * choose (via agent-driven content negotiation). For example, this code
69
- * could be used to present multiple video format options, to list files
70
- * with different filename extensions, or to suggest word-sense
71
- * disambiguation.
72
- */
73
- HttpCodes[(HttpCodes['MultipleChoices'] = 300)] = 'MultipleChoices';
74
- /**
75
- * This and all future requests should be directed to the given URI.
76
- */
77
- HttpCodes[(HttpCodes['MovedPermanently'] = 301)] = 'MovedPermanently';
78
- /**
79
- * (Previously "Moved temporarily") Tells the client to look at (browse to)
80
- * another URL. 302 has been superseded by 303 and 307. This is an example
81
- * of industry practice contradicting the standard. The HTTP/1.0
82
- * specification (RFC 1945) required the client to perform a temporary
83
- * redirect (the original describing phrase was "Moved Temporarily"), but
84
- * popular browsers implemented 302 with the functionality of a 303 See
85
- * Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish
86
- * between the two behaviours. However, some Web applications and frameworks
87
- * use the 302 status code as if it were the 303.
88
- */
89
- HttpCodes[(HttpCodes['Found'] = 302)] = 'Found';
90
- /**
91
- * The response to the request can be found under another URI using the GET
92
- * method. When received in response to a POST (or PUT/DELETE), the client
93
- * should presume that the server has received the data and should issue a
94
- * new GET request to the given URI.
95
- */
96
- HttpCodes[(HttpCodes['SeeOther'] = 303)] = 'SeeOther';
97
- /**
98
- * (RFC 7232) Indicates that the resource has not been modified since the
99
- * version specified by the request headers If-Modified-Since or
100
- * If-None-Match. In such case, there is no need to retransmit the resource
101
- * since the client still has a previously-downloaded copy.
102
- */
103
- HttpCodes[(HttpCodes['NotModified'] = 304)] = 'NotModified';
104
- /**
105
- * The requested resource is available only through a proxy, the address for
106
- * which is provided in the response. For security reasons, many HTTP
107
- * clients (such as Mozilla Firefox and Internet Explorer) do not obey this
108
- * status code.
109
- */
110
- HttpCodes[(HttpCodes['UseProxy'] = 305)] = 'UseProxy';
111
- /**
112
- * No longer used. Originally meant "Subsequent requests should use the
113
- * specified proxy.".
114
- */
115
- HttpCodes[(HttpCodes['SwitchProxy'] = 306)] = 'SwitchProxy';
116
- /**
117
- * In this case, the request should be repeated with another URI; however,
118
- * future requests should still use the original URI. In contrast to how 302
119
- * was historically implemented, the request method is not allowed to be
120
- * changed when reissuing the original request. For example, a POST request
121
- * should be repeated using another POST request.
122
- */
123
- HttpCodes[(HttpCodes['TemporaryRedirect'] = 307)] = 'TemporaryRedirect';
124
- /**
125
- * (RFC 7538) The request and all future requests should be repeated using
126
- * another URI. 307 and 308 parallel the behaviors of 302 and 301, but do
127
- * not allow the HTTP method to change. So, for example, submitting a form
128
- * to a permanently redirected resource may continue smoothly.
129
- */
130
- HttpCodes[(HttpCodes['PermanentRedirect'] = 308)] = 'PermanentRedirect';
131
- /**
132
- * The server cannot or will not process the request due to an apparent
133
- * client error (e.g., malformed request syntax, size too large, invalid
134
- * request message framing, or deceptive request routing).
135
- */
136
- HttpCodes[(HttpCodes['BadRequest'] = 400)] = 'BadRequest';
137
- /**
138
- * (RFC 7235) Similar to 403 Forbidden, but specifically for use when
139
- * authentication is required and has failed or has not yet been provided.
140
- * The response must include a WWW-Authenticate header field containing a
141
- * challenge applicable to the requested resource. See Basic access
142
- * authentication and Digest access authentication. 401 semantically means
143
- * "unauthorised", the user does not have valid authentication credentials
144
- * for the target resource.
145
- */
146
- HttpCodes[(HttpCodes['Unauthorized'] = 401)] = 'Unauthorized';
147
- /**
148
- * Reserved for future use. The original intention was that this code might
149
- * be used as part of some form of digital cash or micropayment scheme, as
150
- * proposed, for example, by GNU Taler, but that has not yet happened, and
151
- * this code is not widely used. Google Developers API uses this status if a
152
- * particular developer has exceeded the daily limit on requests. Sipgate
153
- * uses this code if an account does not have sufficient funds to start a
154
- * call. Shopify uses this code when the store has not paid their fees and
155
- * is temporarily disabled. Stripe uses this code for failed payments where
156
- * parameters were correct, for example blocked fraudulent payments.
157
- */
158
- HttpCodes[(HttpCodes['PaymentRequired'] = 402)] = 'PaymentRequired';
159
- /**
160
- * The request contained valid data and was understood by the server, but
161
- * the server is refusing action. This may be due to the user not having the
162
- * necessary permissions for a resource or needing an account of some sort,
163
- * or attempting a prohibited action (e.g. creating a duplicate record
164
- * where only one is allowed). This code is also typically used if the
165
- * request provided authentication by answering the WWW-Authenticate header
166
- * field challenge, but the server did not accept that authentication. The
167
- * request should not be repeated.
168
- */
169
- HttpCodes[(HttpCodes['Forbidden'] = 403)] = 'Forbidden';
170
- /**
171
- * The requested resource could not be found but may be available in the
172
- * future. Subsequent requests by the client are permissible.
173
- */
174
- HttpCodes[(HttpCodes['NotFound'] = 404)] = 'NotFound';
175
- /**
176
- * A request method is not supported for the requested resource; for example,
177
- * a GET request on a form that requires data to be presented via POST, or a
178
- * PUT request on a read-only resource.
179
- */
180
- HttpCodes[(HttpCodes['MethodNotAllowed'] = 405)] = 'MethodNotAllowed';
181
- /**
182
- * The requested resource is capable of generating only content not
183
- * acceptable according to the Accept headers sent in the request. See Content negotiation.
184
- */
185
- HttpCodes[(HttpCodes['NotAcceptable'] = 406)] = 'NotAcceptable';
186
- /**
187
- * (RFC 7235) The client must first authenticate itself with the proxy.
188
- */
189
- HttpCodes[(HttpCodes['ProxyAuthenticationRequired'] = 407)] = 'ProxyAuthenticationRequired';
190
- /**
191
- * The server timed out waiting for the request. According to HTTP
192
- * specifications: "The client did not produce a request within the time
193
- * that the server was prepared to wait. The client MAY repeat the request
194
- * without modifications at any later time."
195
- */
196
- HttpCodes[(HttpCodes['RequestTimeout'] = 408)] = 'RequestTimeout';
197
- /**
198
- * Indicates that the request could not be processed because of conflict in
199
- * the current state of the resource, such as an edit conflict between
200
- * multiple simultaneous updates.
201
- */
202
- HttpCodes[(HttpCodes['Conflict'] = 409)] = 'Conflict';
203
- /**
204
- * Indicates that the resource requested is no longer available and will not
205
- * be available again. This should be used when a resource has been
206
- * intentionally removed and the resource should be purged. Upon receiving a
207
- * 410 status code, the client should not request the resource in the future.
208
- * Clients such as search engines should remove the resource from their
209
- * indices. Most use cases do not require clients and search engines to
210
- * purge the resource, and a "404 Not Found" may be used instead.
211
- */
212
- HttpCodes[(HttpCodes['Gone'] = 410)] = 'Gone';
213
- /**
214
- * The request did not specify the length of its content, which is required
215
- * by the requested resource.
216
- */
217
- HttpCodes[(HttpCodes['LengthRequired'] = 411)] = 'LengthRequired';
218
- /**
219
- * (RFC 7232) The server does not meet one of the preconditions that the
220
- * requester put on the request header fields.
221
- */
222
- HttpCodes[(HttpCodes['PreconditionFailed'] = 412)] = 'PreconditionFailed';
223
- /**
224
- * (RFC 7231) The request is larger than the server is willing or able to
225
- * process. Previously called "Request Entity Too Large".
226
- */
227
- HttpCodes[(HttpCodes['PayloadTooLarge'] = 413)] = 'PayloadTooLarge';
228
- /**
229
- * (RFC 7231) The URI provided was too long for the server to process. Often
230
- * the result of too much data being encoded as a query-string of a GET
231
- * request, in which case it should be converted to a POST request. Called
232
- * "Request-URI Too Long" previously.
233
- */
234
- HttpCodes[(HttpCodes['URITooLong'] = 414)] = 'URITooLong';
235
- /**
236
- * (RFC 7231) The request entity has a media type which the server or
237
- * resource does not support. For example, the client uploads an image as
238
- * image/svg+xml, but the server requires that images use a different format.
239
- */
240
- HttpCodes[(HttpCodes['UnsupportedMediaType'] = 415)] = 'UnsupportedMediaType';
241
- /**
242
- * (RFC 7233) The client has asked for a portion of the file (byte serving),
243
- * but the server cannot supply that portion. For example, if the client
244
- * asked for a part of the file that lies beyond the end of the file. Called
245
- * "Requested Range Not Satisfiable" previously.
246
- */
247
- HttpCodes[(HttpCodes['RangeNotSatisfiable'] = 416)] = 'RangeNotSatisfiable';
248
- /**
249
- * The server cannot meet the requirements of the Expect request-header
250
- * field.
251
- */
252
- HttpCodes[(HttpCodes['ExpectationFailed'] = 417)] = 'ExpectationFailed';
253
- /**
254
- * (RFC 2324, RFC 7168) This code was defined in 1998 as one of the
255
- * traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot
256
- * Control Protocol, and is not expected to be implemented by actual HTTP
257
- * servers. The RFC specifies this code should be returned by teapots
258
- * requested to brew coffee. This HTTP status is used as an Easter egg in
259
- * some websites, such as Google.com's I'm a teapot easter egg.
260
- */
261
- HttpCodes[(HttpCodes['IAmATeapot'] = 418)] = 'IAmATeapot';
262
- /**
263
- * Returned by the Twitter Search and Trends API when the client is being rate limited.
264
- * The text is a quote from 'Demolition Man' and the '420' code is likely a reference
265
- * to this number's association with marijuana. Other services may wish to implement
266
- * the 429 Too Many Requests response code instead.
267
- */
268
- HttpCodes[(HttpCodes['EnhanceYourCalm'] = 420)] = 'EnhanceYourCalm';
269
- /**
270
- * (RFC 7540) The request was directed at a server that is not able to
271
- * produce a response (for example because of connection reuse).
272
- */
273
- HttpCodes[(HttpCodes['MisdirectedRequest'] = 421)] = 'MisdirectedRequest';
274
- /**
275
- * (WebDAV; RFC 4918) The request was well-formed but was unable to be
276
- * followed due to semantic errors.
277
- */
278
- HttpCodes[(HttpCodes['UnprocessableEntity'] = 422)] = 'UnprocessableEntity';
279
- /**
280
- * (WebDAV; RFC 4918) The resource that is being accessed is locked.
281
- */
282
- HttpCodes[(HttpCodes['Locked'] = 423)] = 'Locked';
283
- /**
284
- * (WebDAV; RFC 4918) The request failed because it depended on another
285
- * request and that request failed (e.g., a PROPPATCH).
286
- */
287
- HttpCodes[(HttpCodes['FailedDependency'] = 424)] = 'FailedDependency';
288
- /**
289
- * (RFC 8470) Indicates that the server is unwilling to risk processing a
290
- * request that might be replayed.
291
- */
292
- HttpCodes[(HttpCodes['TooEarly'] = 425)] = 'TooEarly';
293
- /**
294
- * The client should switch to a different protocol such as TLS/1.0, given
295
- * in the Upgrade header field.
296
- */
297
- HttpCodes[(HttpCodes['UpgradeRequired'] = 426)] = 'UpgradeRequired';
298
- /**
299
- * (RFC 6585) The origin server requires the request to be conditional.
300
- * Intended to prevent the 'lost update' problem, where a client GETs a
301
- * resource's state, modifies it, and PUTs it back to the server, when
302
- * meanwhile a third party has modified the state on the server, leading to
303
- * a conflict.
304
- */
305
- HttpCodes[(HttpCodes['PreconditionRequired'] = 428)] = 'PreconditionRequired';
306
- /**
307
- * (RFC 6585) The user has sent too many requests in a given amount of time.
308
- * Intended for use with rate-limiting schemes.
309
- */
310
- HttpCodes[(HttpCodes['TooManyRequests'] = 429)] = 'TooManyRequests';
311
- /**
312
- * (RFC 6585) The server is unwilling to process the request because either
313
- * an individual header field, or all the header fields collectively, are
314
- * too large.
315
- */
316
- HttpCodes[(HttpCodes['RequestHeaderFieldsTooLarge'] = 431)] = 'RequestHeaderFieldsTooLarge';
317
- /**
318
- * (RFC 7725) A server operator has received a legal demand to deny access
319
- * to a resource or to a set of resources that includes the requested
320
- * resource. The code 451 was chosen as a reference to the novel Fahrenheit
321
- * 451 (see the Acknowledgements in the RFC).
322
- */
323
- HttpCodes[(HttpCodes['UnavailableForLegalReasons'] = 451)] = 'UnavailableForLegalReasons';
324
- /**
325
- * A generic error message, given when an unexpected condition was
326
- * encountered and no more specific message is suitable.
327
- */
328
- HttpCodes[(HttpCodes['InternalServerError'] = 500)] = 'InternalServerError';
329
- /**
330
- * The server either does not recognize the request method, or it lacks the
331
- * ability to fulfil the request. Usually this implies future availability
332
- * (e.g., a new feature of a web-service API).
333
- */
334
- HttpCodes[(HttpCodes['NotImplemented'] = 501)] = 'NotImplemented';
335
- /**
336
- * The server was acting as a gateway or proxy and received an invalid
337
- * response from the upstream server.
338
- */
339
- HttpCodes[(HttpCodes['BadGateway'] = 502)] = 'BadGateway';
340
- /**
341
- * The server cannot handle the request (because it is overloaded or down
342
- * for maintenance). Generally, this is a temporary state.
343
- */
344
- HttpCodes[(HttpCodes['ServiceUnavailable'] = 503)] = 'ServiceUnavailable';
345
- /**
346
- * The server was acting as a gateway or proxy and did not receive a timely
347
- * response from the upstream server.
348
- */
349
- HttpCodes[(HttpCodes['GatewayTimeout'] = 504)] = 'GatewayTimeout';
350
- /**
351
- * The server does not support the HTTP protocol version used in the request.
352
- */
353
- HttpCodes[(HttpCodes['HTTPVersionNotSupported'] = 505)] = 'HTTPVersionNotSupported';
354
- /**
355
- * (RFC 2295) Transparent content negotiation for the request results in a
356
- * circular reference.
357
- */
358
- HttpCodes[(HttpCodes['VariantAlsoNegotiates'] = 506)] = 'VariantAlsoNegotiates';
359
- /**
360
- * (WebDAV; RFC 4918) The server is unable to store the representation
361
- * needed to complete the request.
362
- */
363
- HttpCodes[(HttpCodes['InsufficientStorage'] = 507)] = 'InsufficientStorage';
364
- /**
365
- * (WebDAV; RFC 5842) The server detected an infinite loop while processing
366
- * the request (sent instead of 208 Already Reported).
367
- */
368
- HttpCodes[(HttpCodes['LoopDetected'] = 508)] = 'LoopDetected';
369
- /**
370
- * (RFC 2774) Further extensions to the request are required for the server
371
- * to fulfil it.
372
- */
373
- HttpCodes[(HttpCodes['NotExtended'] = 510)] = 'NotExtended';
374
- /**
375
- * (RFC 6585) The client needs to authenticate to gain network access.
376
- * Intended for use by intercepting proxies used to control access to the
377
- * network (e.g., "captive portals" used to require agreement to Terms of
378
- * Service before granting full Internet access via a Wi-Fi hotspot).
379
- */
380
- HttpCodes[(HttpCodes['NetworkAuthenticationRequired'] = 511)] = 'NetworkAuthenticationRequired';
381
- })((HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})));
382
- //# sourceMappingURL=HttpCodes.js.map
6
+ /**
7
+ * Standard response for successful HTTP requests. The actual response will
8
+ * depend on the request method used. In a GET request, the response will
9
+ * contain an entity corresponding to the requested resource. In a POST
10
+ * request, the response will contain an entity describing or containing the
11
+ * result of the action.
12
+ */
13
+ HttpCodes[HttpCodes["OK"] = 200] = "OK";
14
+ /**
15
+ * The request has been fulfilled, resulting in the creation of a new
16
+ * resource.
17
+ */
18
+ HttpCodes[HttpCodes["Created"] = 201] = "Created";
19
+ /**
20
+ * The request has been accepted for processing, but the processing has not
21
+ * been completed. The request might or might not be eventually acted upon,
22
+ * and may be disallowed when processing occurs.
23
+ */
24
+ HttpCodes[HttpCodes["Accepted"] = 202] = "Accepted";
25
+ /**
26
+ * The server is a transforming proxy (e.g. a Web accelerator) that received
27
+ * a 200 OK from its origin, but is returning a modified version of the
28
+ * origin's response.
29
+ */
30
+ HttpCodes[HttpCodes["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
31
+ /**
32
+ * The server successfully processed the request, and is not returning any
33
+ * content.
34
+ */
35
+ HttpCodes[HttpCodes["NoContent"] = 204] = "NoContent";
36
+ /**
37
+ * The server successfully processed the request, asks that the requester
38
+ * reset its document view, and is not returning any content.
39
+ */
40
+ HttpCodes[HttpCodes["ResetContent"] = 205] = "ResetContent";
41
+ /**
42
+ * (RFC 7233) The server is delivering only part of the resource (byte
43
+ * serving) due to a range header sent by the client. The range header is
44
+ * used by HTTP clients to enable resuming of interrupted downloads, or
45
+ * split a download into multiple simultaneous streams.
46
+ */
47
+ HttpCodes[HttpCodes["PartialContent"] = 206] = "PartialContent";
48
+ /**
49
+ * (WebDAV; RFC 4918) The message body that follows is by default an XML
50
+ * message and can contain a number of separate response codes, depending on
51
+ * how many sub-requests were made.
52
+ */
53
+ HttpCodes[HttpCodes["MultiStatus"] = 207] = "MultiStatus";
54
+ /**
55
+ * (WebDAV; RFC 5842) The members of a DAV binding have already been
56
+ * enumerated in a preceding part of the (multistatus) response, and are not
57
+ * being included again.
58
+ */
59
+ HttpCodes[HttpCodes["AlreadyReported"] = 208] = "AlreadyReported";
60
+ /**
61
+ * (RFC 3229) The server has fulfilled a request for the resource, and the
62
+ * response is a representation of the result of one or more
63
+ * instance-manipulations applied to the current instance.
64
+ */
65
+ HttpCodes[HttpCodes["IMUsed"] = 226] = "IMUsed";
66
+ /**
67
+ * Indicates multiple options for the resource from which the client may
68
+ * choose (via agent-driven content negotiation). For example, this code
69
+ * could be used to present multiple video format options, to list files
70
+ * with different filename extensions, or to suggest word-sense
71
+ * disambiguation.
72
+ */
73
+ HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
74
+ /**
75
+ * This and all future requests should be directed to the given URI.
76
+ */
77
+ HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
78
+ /**
79
+ * (Previously "Moved temporarily") Tells the client to look at (browse to)
80
+ * another URL. 302 has been superseded by 303 and 307. This is an example
81
+ * of industry practice contradicting the standard. The HTTP/1.0
82
+ * specification (RFC 1945) required the client to perform a temporary
83
+ * redirect (the original describing phrase was "Moved Temporarily"), but
84
+ * popular browsers implemented 302 with the functionality of a 303 See
85
+ * Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish
86
+ * between the two behaviours. However, some Web applications and frameworks
87
+ * use the 302 status code as if it were the 303.
88
+ */
89
+ HttpCodes[HttpCodes["Found"] = 302] = "Found";
90
+ /**
91
+ * The response to the request can be found under another URI using the GET
92
+ * method. When received in response to a POST (or PUT/DELETE), the client
93
+ * should presume that the server has received the data and should issue a
94
+ * new GET request to the given URI.
95
+ */
96
+ HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
97
+ /**
98
+ * (RFC 7232) Indicates that the resource has not been modified since the
99
+ * version specified by the request headers If-Modified-Since or
100
+ * If-None-Match. In such case, there is no need to retransmit the resource
101
+ * since the client still has a previously-downloaded copy.
102
+ */
103
+ HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
104
+ /**
105
+ * The requested resource is available only through a proxy, the address for
106
+ * which is provided in the response. For security reasons, many HTTP
107
+ * clients (such as Mozilla Firefox and Internet Explorer) do not obey this
108
+ * status code.
109
+ */
110
+ HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
111
+ /**
112
+ * No longer used. Originally meant "Subsequent requests should use the
113
+ * specified proxy.".
114
+ */
115
+ HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
116
+ /**
117
+ * In this case, the request should be repeated with another URI; however,
118
+ * future requests should still use the original URI. In contrast to how 302
119
+ * was historically implemented, the request method is not allowed to be
120
+ * changed when reissuing the original request. For example, a POST request
121
+ * should be repeated using another POST request.
122
+ */
123
+ HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
124
+ /**
125
+ * (RFC 7538) The request and all future requests should be repeated using
126
+ * another URI. 307 and 308 parallel the behaviors of 302 and 301, but do
127
+ * not allow the HTTP method to change. So, for example, submitting a form
128
+ * to a permanently redirected resource may continue smoothly.
129
+ */
130
+ HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
131
+ /**
132
+ * The server cannot or will not process the request due to an apparent
133
+ * client error (e.g., malformed request syntax, size too large, invalid
134
+ * request message framing, or deceptive request routing).
135
+ */
136
+ HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
137
+ /**
138
+ * (RFC 7235) Similar to 403 Forbidden, but specifically for use when
139
+ * authentication is required and has failed or has not yet been provided.
140
+ * The response must include a WWW-Authenticate header field containing a
141
+ * challenge applicable to the requested resource. See Basic access
142
+ * authentication and Digest access authentication. 401 semantically means
143
+ * "unauthorised", the user does not have valid authentication credentials
144
+ * for the target resource.
145
+ */
146
+ HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
147
+ /**
148
+ * Reserved for future use. The original intention was that this code might
149
+ * be used as part of some form of digital cash or micropayment scheme, as
150
+ * proposed, for example, by GNU Taler, but that has not yet happened, and
151
+ * this code is not widely used. Google Developers API uses this status if a
152
+ * particular developer has exceeded the daily limit on requests. Sipgate
153
+ * uses this code if an account does not have sufficient funds to start a
154
+ * call. Shopify uses this code when the store has not paid their fees and
155
+ * is temporarily disabled. Stripe uses this code for failed payments where
156
+ * parameters were correct, for example blocked fraudulent payments.
157
+ */
158
+ HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
159
+ /**
160
+ * The request contained valid data and was understood by the server, but
161
+ * the server is refusing action. This may be due to the user not having the
162
+ * necessary permissions for a resource or needing an account of some sort,
163
+ * or attempting a prohibited action (e.g. creating a duplicate record
164
+ * where only one is allowed). This code is also typically used if the
165
+ * request provided authentication by answering the WWW-Authenticate header
166
+ * field challenge, but the server did not accept that authentication. The
167
+ * request should not be repeated.
168
+ */
169
+ HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
170
+ /**
171
+ * The requested resource could not be found but may be available in the
172
+ * future. Subsequent requests by the client are permissible.
173
+ */
174
+ HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
175
+ /**
176
+ * A request method is not supported for the requested resource; for example,
177
+ * a GET request on a form that requires data to be presented via POST, or a
178
+ * PUT request on a read-only resource.
179
+ */
180
+ HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
181
+ /**
182
+ * The requested resource is capable of generating only content not
183
+ * acceptable according to the Accept headers sent in the request. See Content negotiation.
184
+ */
185
+ HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
186
+ /**
187
+ * (RFC 7235) The client must first authenticate itself with the proxy.
188
+ */
189
+ HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
190
+ /**
191
+ * The server timed out waiting for the request. According to HTTP
192
+ * specifications: "The client did not produce a request within the time
193
+ * that the server was prepared to wait. The client MAY repeat the request
194
+ * without modifications at any later time."
195
+ */
196
+ HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
197
+ /**
198
+ * Indicates that the request could not be processed because of conflict in
199
+ * the current state of the resource, such as an edit conflict between
200
+ * multiple simultaneous updates.
201
+ */
202
+ HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
203
+ /**
204
+ * Indicates that the resource requested is no longer available and will not
205
+ * be available again. This should be used when a resource has been
206
+ * intentionally removed and the resource should be purged. Upon receiving a
207
+ * 410 status code, the client should not request the resource in the future.
208
+ * Clients such as search engines should remove the resource from their
209
+ * indices. Most use cases do not require clients and search engines to
210
+ * purge the resource, and a "404 Not Found" may be used instead.
211
+ */
212
+ HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
213
+ /**
214
+ * The request did not specify the length of its content, which is required
215
+ * by the requested resource.
216
+ */
217
+ HttpCodes[HttpCodes["LengthRequired"] = 411] = "LengthRequired";
218
+ /**
219
+ * (RFC 7232) The server does not meet one of the preconditions that the
220
+ * requester put on the request header fields.
221
+ */
222
+ HttpCodes[HttpCodes["PreconditionFailed"] = 412] = "PreconditionFailed";
223
+ /**
224
+ * (RFC 7231) The request is larger than the server is willing or able to
225
+ * process. Previously called "Request Entity Too Large".
226
+ */
227
+ HttpCodes[HttpCodes["PayloadTooLarge"] = 413] = "PayloadTooLarge";
228
+ /**
229
+ * (RFC 7231) The URI provided was too long for the server to process. Often
230
+ * the result of too much data being encoded as a query-string of a GET
231
+ * request, in which case it should be converted to a POST request. Called
232
+ * "Request-URI Too Long" previously.
233
+ */
234
+ HttpCodes[HttpCodes["URITooLong"] = 414] = "URITooLong";
235
+ /**
236
+ * (RFC 7231) The request entity has a media type which the server or
237
+ * resource does not support. For example, the client uploads an image as
238
+ * image/svg+xml, but the server requires that images use a different format.
239
+ */
240
+ HttpCodes[HttpCodes["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
241
+ /**
242
+ * (RFC 7233) The client has asked for a portion of the file (byte serving),
243
+ * but the server cannot supply that portion. For example, if the client
244
+ * asked for a part of the file that lies beyond the end of the file. Called
245
+ * "Requested Range Not Satisfiable" previously.
246
+ */
247
+ HttpCodes[HttpCodes["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable";
248
+ /**
249
+ * The server cannot meet the requirements of the Expect request-header
250
+ * field.
251
+ */
252
+ HttpCodes[HttpCodes["ExpectationFailed"] = 417] = "ExpectationFailed";
253
+ /**
254
+ * (RFC 2324, RFC 7168) This code was defined in 1998 as one of the
255
+ * traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot
256
+ * Control Protocol, and is not expected to be implemented by actual HTTP
257
+ * servers. The RFC specifies this code should be returned by teapots
258
+ * requested to brew coffee. This HTTP status is used as an Easter egg in
259
+ * some websites, such as Google.com's I'm a teapot easter egg.
260
+ */
261
+ HttpCodes[HttpCodes["IAmATeapot"] = 418] = "IAmATeapot";
262
+ /**
263
+ * Returned by the Twitter Search and Trends API when the client is being rate limited.
264
+ * The text is a quote from 'Demolition Man' and the '420' code is likely a reference
265
+ * to this number's association with marijuana. Other services may wish to implement
266
+ * the 429 Too Many Requests response code instead.
267
+ */
268
+ HttpCodes[HttpCodes["EnhanceYourCalm"] = 420] = "EnhanceYourCalm";
269
+ /**
270
+ * (RFC 7540) The request was directed at a server that is not able to
271
+ * produce a response (for example because of connection reuse).
272
+ */
273
+ HttpCodes[HttpCodes["MisdirectedRequest"] = 421] = "MisdirectedRequest";
274
+ /**
275
+ * (WebDAV; RFC 4918) The request was well-formed but was unable to be
276
+ * followed due to semantic errors.
277
+ */
278
+ HttpCodes[HttpCodes["UnprocessableEntity"] = 422] = "UnprocessableEntity";
279
+ /**
280
+ * (WebDAV; RFC 4918) The resource that is being accessed is locked.
281
+ */
282
+ HttpCodes[HttpCodes["Locked"] = 423] = "Locked";
283
+ /**
284
+ * (WebDAV; RFC 4918) The request failed because it depended on another
285
+ * request and that request failed (e.g., a PROPPATCH).
286
+ */
287
+ HttpCodes[HttpCodes["FailedDependency"] = 424] = "FailedDependency";
288
+ /**
289
+ * (RFC 8470) Indicates that the server is unwilling to risk processing a
290
+ * request that might be replayed.
291
+ */
292
+ HttpCodes[HttpCodes["TooEarly"] = 425] = "TooEarly";
293
+ /**
294
+ * The client should switch to a different protocol such as TLS/1.0, given
295
+ * in the Upgrade header field.
296
+ */
297
+ HttpCodes[HttpCodes["UpgradeRequired"] = 426] = "UpgradeRequired";
298
+ /**
299
+ * (RFC 6585) The origin server requires the request to be conditional.
300
+ * Intended to prevent the 'lost update' problem, where a client GETs a
301
+ * resource's state, modifies it, and PUTs it back to the server, when
302
+ * meanwhile a third party has modified the state on the server, leading to
303
+ * a conflict.
304
+ */
305
+ HttpCodes[HttpCodes["PreconditionRequired"] = 428] = "PreconditionRequired";
306
+ /**
307
+ * (RFC 6585) The user has sent too many requests in a given amount of time.
308
+ * Intended for use with rate-limiting schemes.
309
+ */
310
+ HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
311
+ /**
312
+ * (RFC 6585) The server is unwilling to process the request because either
313
+ * an individual header field, or all the header fields collectively, are
314
+ * too large.
315
+ */
316
+ HttpCodes[HttpCodes["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge";
317
+ /**
318
+ * (RFC 7725) A server operator has received a legal demand to deny access
319
+ * to a resource or to a set of resources that includes the requested
320
+ * resource. The code 451 was chosen as a reference to the novel Fahrenheit
321
+ * 451 (see the Acknowledgements in the RFC).
322
+ */
323
+ HttpCodes[HttpCodes["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons";
324
+ /**
325
+ * A generic error message, given when an unexpected condition was
326
+ * encountered and no more specific message is suitable.
327
+ */
328
+ HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
329
+ /**
330
+ * The server either does not recognize the request method, or it lacks the
331
+ * ability to fulfil the request. Usually this implies future availability
332
+ * (e.g., a new feature of a web-service API).
333
+ */
334
+ HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
335
+ /**
336
+ * The server was acting as a gateway or proxy and received an invalid
337
+ * response from the upstream server.
338
+ */
339
+ HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
340
+ /**
341
+ * The server cannot handle the request (because it is overloaded or down
342
+ * for maintenance). Generally, this is a temporary state.
343
+ */
344
+ HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
345
+ /**
346
+ * The server was acting as a gateway or proxy and did not receive a timely
347
+ * response from the upstream server.
348
+ */
349
+ HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
350
+ /**
351
+ * The server does not support the HTTP protocol version used in the request.
352
+ */
353
+ HttpCodes[HttpCodes["HTTPVersionNotSupported"] = 505] = "HTTPVersionNotSupported";
354
+ /**
355
+ * (RFC 2295) Transparent content negotiation for the request results in a
356
+ * circular reference.
357
+ */
358
+ HttpCodes[HttpCodes["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates";
359
+ /**
360
+ * (WebDAV; RFC 4918) The server is unable to store the representation
361
+ * needed to complete the request.
362
+ */
363
+ HttpCodes[HttpCodes["InsufficientStorage"] = 507] = "InsufficientStorage";
364
+ /**
365
+ * (WebDAV; RFC 5842) The server detected an infinite loop while processing
366
+ * the request (sent instead of 208 Already Reported).
367
+ */
368
+ HttpCodes[HttpCodes["LoopDetected"] = 508] = "LoopDetected";
369
+ /**
370
+ * (RFC 2774) Further extensions to the request are required for the server
371
+ * to fulfil it.
372
+ */
373
+ HttpCodes[HttpCodes["NotExtended"] = 510] = "NotExtended";
374
+ /**
375
+ * (RFC 6585) The client needs to authenticate to gain network access.
376
+ * Intended for use by intercepting proxies used to control access to the
377
+ * network (e.g., "captive portals" used to require agreement to Terms of
378
+ * Service before granting full Internet access via a Wi-Fi hotspot).
379
+ */
380
+ HttpCodes[HttpCodes["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired";
381
+ })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
382
+ //# sourceMappingURL=HttpCodes.js.map