@catbee/utils 0.0.1 → 0.0.2
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.
- package/README.md +303 -107
- package/build/esm/config.d.ts +12 -0
- package/build/esm/config.js +12 -0
- package/build/esm/config.js.map +1 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/api-response.d.ts +82 -0
- package/build/esm/types/api-response.js.map +1 -1
- package/build/esm/utils/array.utils.d.ts +64 -1
- package/build/esm/utils/array.utils.js +139 -2
- package/build/esm/utils/array.utils.js.map +1 -1
- package/build/esm/utils/async.utils.d.ts +60 -1
- package/build/esm/utils/async.utils.js +160 -2
- package/build/esm/utils/async.utils.js.map +1 -1
- package/build/esm/utils/cache.utils.d.ts +67 -4
- package/build/esm/utils/cache.utils.js +210 -28
- package/build/esm/utils/cache.utils.js.map +1 -1
- package/build/esm/utils/context-store.utils.d.ts +101 -0
- package/build/esm/utils/context-store.utils.js +182 -0
- package/build/esm/utils/context-store.utils.js.map +1 -1
- package/build/esm/utils/crypto.utils.d.ts +110 -8
- package/build/esm/utils/crypto.utils.js +298 -15
- package/build/esm/utils/crypto.utils.js.map +1 -1
- package/build/esm/utils/decorators.utils.d.ts +40 -0
- package/build/esm/utils/decorators.utils.js +312 -0
- package/build/esm/utils/decorators.utils.js.map +1 -0
- package/build/esm/utils/dir.utils.d.ts +121 -0
- package/build/esm/utils/dir.utils.js +577 -0
- package/build/esm/utils/dir.utils.js.map +1 -1
- package/build/esm/utils/env.utils.d.ts +83 -0
- package/build/esm/utils/env.utils.js +233 -0
- package/build/esm/utils/env.utils.js.map +1 -1
- package/build/esm/utils/exception.utils.d.ts +116 -0
- package/build/esm/utils/exception.utils.js +322 -0
- package/build/esm/utils/exception.utils.js.map +1 -1
- package/build/esm/utils/fs.utils.d.ts +132 -0
- package/build/esm/utils/fs.utils.js +421 -0
- package/build/esm/utils/fs.utils.js.map +1 -1
- package/build/esm/utils/http-status-codes.d.ts +87 -178
- package/build/esm/utils/http-status-codes.js +92 -178
- package/build/esm/utils/http-status-codes.js.map +1 -1
- package/build/esm/utils/id.utils.d.ts +11 -10
- package/build/esm/utils/id.utils.js +29 -20
- package/build/esm/utils/id.utils.js.map +1 -1
- package/build/esm/utils/logger.utils.d.ts +24 -0
- package/build/esm/utils/logger.utils.js +54 -0
- package/build/esm/utils/logger.utils.js.map +1 -1
- package/build/esm/utils/middleware.utils.d.ts +72 -0
- package/build/esm/utils/middleware.utils.js +158 -0
- package/build/esm/utils/middleware.utils.js.map +1 -0
- package/build/esm/utils/obj.utils.d.ts +65 -3
- package/build/esm/utils/obj.utils.js +205 -6
- package/build/esm/utils/obj.utils.js.map +1 -1
- package/build/esm/utils/response.utils.d.ts +101 -0
- package/build/esm/utils/response.utils.js +153 -0
- package/build/esm/utils/response.utils.js.map +1 -1
- package/build/esm/utils/string.utils.d.ts +61 -5
- package/build/esm/utils/string.utils.js +101 -11
- package/build/esm/utils/string.utils.js.map +1 -1
- package/build/esm/utils/url.utils.d.ts +117 -0
- package/build/esm/utils/url.utils.js +287 -0
- package/build/esm/utils/url.utils.js.map +1 -1
- package/build/esm/utils/validate.utils.d.ts +110 -0
- package/build/esm/utils/validate.utils.js +186 -0
- package/build/esm/utils/validate.utils.js.map +1 -1
- package/build/esnext/config.d.ts +12 -0
- package/build/esnext/config.js +12 -0
- package/build/esnext/config.js.map +1 -1
- package/build/esnext/index.d.ts +1 -0
- package/build/esnext/index.js +1 -0
- package/build/esnext/index.js.map +1 -1
- package/build/esnext/types/api-response.d.ts +82 -0
- package/build/esnext/types/api-response.js.map +1 -1
- package/build/esnext/utils/array.utils.d.ts +64 -1
- package/build/esnext/utils/array.utils.js +129 -2
- package/build/esnext/utils/array.utils.js.map +1 -1
- package/build/esnext/utils/async.utils.d.ts +60 -1
- package/build/esnext/utils/async.utils.js +117 -1
- package/build/esnext/utils/async.utils.js.map +1 -1
- package/build/esnext/utils/cache.utils.d.ts +67 -4
- package/build/esnext/utils/cache.utils.js +137 -9
- package/build/esnext/utils/cache.utils.js.map +1 -1
- package/build/esnext/utils/context-store.utils.d.ts +101 -0
- package/build/esnext/utils/context-store.utils.js +168 -0
- package/build/esnext/utils/context-store.utils.js.map +1 -1
- package/build/esnext/utils/crypto.utils.d.ts +110 -8
- package/build/esnext/utils/crypto.utils.js +205 -15
- package/build/esnext/utils/crypto.utils.js.map +1 -1
- package/build/esnext/utils/decorators.utils.d.ts +40 -0
- package/build/esnext/utils/decorators.utils.js +155 -0
- package/build/esnext/utils/decorators.utils.js.map +1 -0
- package/build/esnext/utils/dir.utils.d.ts +121 -0
- package/build/esnext/utils/dir.utils.js +306 -0
- package/build/esnext/utils/dir.utils.js.map +1 -1
- package/build/esnext/utils/env.utils.d.ts +83 -0
- package/build/esnext/utils/env.utils.js +185 -0
- package/build/esnext/utils/env.utils.js.map +1 -1
- package/build/esnext/utils/exception.utils.d.ts +116 -0
- package/build/esnext/utils/exception.utils.js +213 -0
- package/build/esnext/utils/exception.utils.js.map +1 -1
- package/build/esnext/utils/fs.utils.d.ts +132 -0
- package/build/esnext/utils/fs.utils.js +268 -0
- package/build/esnext/utils/fs.utils.js.map +1 -1
- package/build/esnext/utils/http-status-codes.d.ts +87 -178
- package/build/esnext/utils/http-status-codes.js +92 -178
- package/build/esnext/utils/http-status-codes.js.map +1 -1
- package/build/esnext/utils/id.utils.d.ts +11 -10
- package/build/esnext/utils/id.utils.js +27 -19
- package/build/esnext/utils/id.utils.js.map +1 -1
- package/build/esnext/utils/logger.utils.d.ts +24 -0
- package/build/esnext/utils/logger.utils.js +42 -0
- package/build/esnext/utils/logger.utils.js.map +1 -1
- package/build/esnext/utils/middleware.utils.d.ts +72 -0
- package/build/esnext/utils/middleware.utils.js +157 -0
- package/build/esnext/utils/middleware.utils.js.map +1 -0
- package/build/esnext/utils/obj.utils.d.ts +65 -3
- package/build/esnext/utils/obj.utils.js +167 -3
- package/build/esnext/utils/obj.utils.js.map +1 -1
- package/build/esnext/utils/response.utils.d.ts +101 -0
- package/build/esnext/utils/response.utils.js +138 -0
- package/build/esnext/utils/response.utils.js.map +1 -1
- package/build/esnext/utils/string.utils.d.ts +61 -5
- package/build/esnext/utils/string.utils.js +110 -14
- package/build/esnext/utils/string.utils.js.map +1 -1
- package/build/esnext/utils/url.utils.d.ts +117 -0
- package/build/esnext/utils/url.utils.js +248 -0
- package/build/esnext/utils/url.utils.js.map +1 -1
- package/build/esnext/utils/validate.utils.d.ts +110 -0
- package/build/esnext/utils/validate.utils.js +184 -0
- package/build/esnext/utils/validate.utils.js.map +1 -1
- package/build/src/config.d.ts +12 -0
- package/build/src/config.js +12 -0
- package/build/src/config.js.map +1 -1
- package/build/src/index.d.ts +1 -0
- package/build/src/index.js +1 -0
- package/build/src/index.js.map +1 -1
- package/build/src/types/api-response.d.ts +82 -0
- package/build/src/types/api-response.js.map +1 -1
- package/build/src/utils/array.utils.d.ts +64 -1
- package/build/src/utils/array.utils.js +137 -4
- package/build/src/utils/array.utils.js.map +1 -1
- package/build/src/utils/async.utils.d.ts +60 -1
- package/build/src/utils/async.utils.js +124 -4
- package/build/src/utils/async.utils.js.map +1 -1
- package/build/src/utils/cache.utils.d.ts +67 -4
- package/build/src/utils/cache.utils.js +137 -9
- package/build/src/utils/cache.utils.js.map +1 -1
- package/build/src/utils/context-store.utils.d.ts +101 -0
- package/build/src/utils/context-store.utils.js +171 -1
- package/build/src/utils/context-store.utils.js.map +1 -1
- package/build/src/utils/crypto.utils.d.ts +110 -8
- package/build/src/utils/crypto.utils.js +224 -27
- package/build/src/utils/crypto.utils.js.map +1 -1
- package/build/src/utils/decorators.utils.d.ts +40 -0
- package/build/src/utils/decorators.utils.js +165 -0
- package/build/src/utils/decorators.utils.js.map +1 -0
- package/build/src/utils/dir.utils.d.ts +121 -0
- package/build/src/utils/dir.utils.js +316 -0
- package/build/src/utils/dir.utils.js.map +1 -1
- package/build/src/utils/env.utils.d.ts +83 -0
- package/build/src/utils/env.utils.js +186 -1
- package/build/src/utils/env.utils.js.map +1 -1
- package/build/src/utils/exception.utils.d.ts +116 -0
- package/build/src/utils/exception.utils.js +226 -1
- package/build/src/utils/exception.utils.js.map +1 -1
- package/build/src/utils/fs.utils.d.ts +132 -0
- package/build/src/utils/fs.utils.js +282 -0
- package/build/src/utils/fs.utils.js.map +1 -1
- package/build/src/utils/http-status-codes.d.ts +87 -178
- package/build/src/utils/http-status-codes.js +92 -178
- package/build/src/utils/http-status-codes.js.map +1 -1
- package/build/src/utils/id.utils.d.ts +11 -10
- package/build/src/utils/id.utils.js +27 -19
- package/build/src/utils/id.utils.js.map +1 -1
- package/build/src/utils/logger.utils.d.ts +24 -0
- package/build/src/utils/logger.utils.js +45 -0
- package/build/src/utils/logger.utils.js.map +1 -1
- package/build/src/utils/middleware.utils.d.ts +72 -0
- package/build/src/utils/middleware.utils.js +163 -0
- package/build/src/utils/middleware.utils.js.map +1 -0
- package/build/src/utils/obj.utils.d.ts +65 -3
- package/build/src/utils/obj.utils.js +177 -7
- package/build/src/utils/obj.utils.js.map +1 -1
- package/build/src/utils/response.utils.d.ts +101 -0
- package/build/src/utils/response.utils.js +146 -1
- package/build/src/utils/response.utils.js.map +1 -1
- package/build/src/utils/string.utils.d.ts +61 -5
- package/build/src/utils/string.utils.js +122 -20
- package/build/src/utils/string.utils.js.map +1 -1
- package/build/src/utils/url.utils.d.ts +117 -0
- package/build/src/utils/url.utils.js +257 -0
- package/build/src/utils/url.utils.js.map +1 -1
- package/build/src/utils/validate.utils.d.ts +110 -0
- package/build/src/utils/validate.utils.js +198 -0
- package/build/src/utils/validate.utils.js.map +1 -1
- package/package.json +20 -12
|
@@ -1,356 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Complete HTTP status codes enum with descriptions.
|
|
3
|
+
* For use with API responses and error handling.
|
|
4
|
+
*/
|
|
1
5
|
export declare enum HttpStatusCodes {
|
|
2
6
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished.
|
|
7
|
+
* The server has received the request headers and the client should proceed to send the request body.
|
|
6
8
|
*/
|
|
7
9
|
CONTINUE = 100,
|
|
8
10
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* This code is sent in response to an Upgrade request header by the client, and indicates the protocol the server is switching too.
|
|
11
|
+
* The server is switching protocols according to the client's request.
|
|
12
12
|
*/
|
|
13
13
|
SWITCHING_PROTOCOLS = 101,
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* This code indicates that the server has received and is processing the request, but no response is available yet.
|
|
15
|
+
* Server has received the request and is still processing it.
|
|
18
16
|
*/
|
|
19
17
|
PROCESSING = 102,
|
|
20
18
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* This code indicates to the client that the server is likely to send a final response with the header fields included in the informational response.
|
|
19
|
+
* The server is sending preliminary headers while preparing the final response.
|
|
24
20
|
*/
|
|
25
21
|
EARLY_HINTS = 103,
|
|
26
22
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* The request has succeeded. The meaning of a success varies depending on the HTTP method:
|
|
30
|
-
* GET: The resource has been fetched and is transmitted in the message body.
|
|
31
|
-
* HEAD: The entity headers are in the message body.
|
|
32
|
-
* POST: The resource describing the result of the action is transmitted in the message body.
|
|
33
|
-
* TRACE: The message body contains the request message as received by the server
|
|
23
|
+
* The request succeeded. The result meaning depends on the HTTP method used.
|
|
34
24
|
*/
|
|
35
25
|
OK = 200,
|
|
36
26
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request.
|
|
27
|
+
* The request succeeded and a new resource was created as a result.
|
|
40
28
|
*/
|
|
41
29
|
CREATED = 201,
|
|
42
30
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing.
|
|
31
|
+
* The request has been received but not yet acted upon.
|
|
46
32
|
*/
|
|
47
33
|
ACCEPTED = 202,
|
|
48
34
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response.
|
|
35
|
+
* The returned information is from a third-party source, not the origin server.
|
|
52
36
|
*/
|
|
53
37
|
NON_AUTHORITATIVE_INFORMATION = 203,
|
|
54
38
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.
|
|
39
|
+
* The request succeeded but there's no content to send in the response.
|
|
58
40
|
*/
|
|
59
41
|
NO_CONTENT = 204,
|
|
60
42
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* This response code is sent after accomplishing request to tell user agent reset document view which sent this request.
|
|
43
|
+
* The client should reset the document view that caused this request.
|
|
64
44
|
*/
|
|
65
45
|
RESET_CONTENT = 205,
|
|
66
46
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* This response code is used because of range header sent by the client to separate download into multiple streams.
|
|
47
|
+
* The server is delivering only part of the resource due to a range header sent by the client.
|
|
70
48
|
*/
|
|
71
49
|
PARTIAL_CONTENT = 206,
|
|
72
50
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
|
|
51
|
+
* Conveys information about multiple resources, for complex operations.
|
|
76
52
|
*/
|
|
77
53
|
MULTI_STATUS = 207,
|
|
78
54
|
/**
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
55
|
+
* The members of a DAV binding have already been enumerated and are not included in the response.
|
|
56
|
+
*/
|
|
57
|
+
ALREADY_REPORTED = 208,
|
|
58
|
+
/**
|
|
59
|
+
* The server has fulfilled a request for the resource, and the response represents the result of one or more instance-manipulations.
|
|
60
|
+
*/
|
|
61
|
+
IM_USED = 226,
|
|
62
|
+
/**
|
|
63
|
+
* The request has more than one possible response and the client should choose one.
|
|
82
64
|
*/
|
|
83
65
|
MULTIPLE_CHOICES = 300,
|
|
84
66
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* This response code means that URI of requested resource has been changed. Probably, new URI would be given in the response.
|
|
67
|
+
* The resource has been permanently moved to a new URL.
|
|
88
68
|
*/
|
|
89
69
|
MOVED_PERMANENTLY = 301,
|
|
90
70
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* This response code means that URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.
|
|
71
|
+
* The resource has been temporarily moved to another URL.
|
|
94
72
|
*/
|
|
95
73
|
MOVED_TEMPORARILY = 302,
|
|
96
74
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* Server sent this response to directing client to get requested resource to another URI with an GET request.
|
|
75
|
+
* The response to the request can be found under another URI using the GET method.
|
|
100
76
|
*/
|
|
101
77
|
SEE_OTHER = 303,
|
|
102
78
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response.
|
|
79
|
+
* The resource hasn't been modified since the last request.
|
|
106
80
|
*/
|
|
107
81
|
NOT_MODIFIED = 304,
|
|
108
82
|
/**
|
|
109
83
|
* @deprecated
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* Was defined in a previous version of the HTTP specification to indicate that a requested response must be accessed by a proxy. It has been deprecated due to security concerns regarding in-band configuration of a proxy.
|
|
84
|
+
* Response must be accessed through a proxy.
|
|
113
85
|
*/
|
|
114
86
|
USE_PROXY = 305,
|
|
115
87
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* Server sent this response to directing client to get requested resource to another URI with same method that used prior request. This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.
|
|
88
|
+
* The resource is temporarily available at a different URI, using the same HTTP method.
|
|
119
89
|
*/
|
|
120
90
|
TEMPORARY_REDIRECT = 307,
|
|
121
91
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.
|
|
92
|
+
* The resource has been permanently moved to another URL, using the same HTTP method.
|
|
125
93
|
*/
|
|
126
94
|
PERMANENT_REDIRECT = 308,
|
|
127
95
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* This response means that server could not understand the request due to invalid syntax.
|
|
96
|
+
* The server cannot process the request due to a client error (malformed request).
|
|
131
97
|
*/
|
|
132
98
|
BAD_REQUEST = 400,
|
|
133
99
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
|
|
100
|
+
* Authentication is required and has failed or not been provided.
|
|
137
101
|
*/
|
|
138
102
|
UNAUTHORIZED = 401,
|
|
139
103
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems however this is not used currently.
|
|
104
|
+
* Reserved for future use, originally intended for digital payment systems.
|
|
143
105
|
*/
|
|
144
106
|
PAYMENT_REQUIRED = 402,
|
|
145
107
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike 401, the client's identity is known to the server.
|
|
108
|
+
* The client doesn't have permission to access the requested resource.
|
|
149
109
|
*/
|
|
150
110
|
FORBIDDEN = 403,
|
|
151
111
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* The server can not find requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 to hide the existence of a resource from an unauthorized client. This response code is probably the most famous one due to its frequent occurence on the web.
|
|
112
|
+
* The requested resource could not be found on the server.
|
|
155
113
|
*/
|
|
156
114
|
NOT_FOUND = 404,
|
|
157
115
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* The request method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.
|
|
116
|
+
* The request method is not supported for the requested resource.
|
|
161
117
|
*/
|
|
162
118
|
METHOD_NOT_ALLOWED = 405,
|
|
163
119
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
* This response is sent when the web server, after performing server-driven content negotiation, doesn't find any content following the criteria given by the user agent.
|
|
120
|
+
* The server can't provide a response matching the list of acceptable values in the client's headers.
|
|
167
121
|
*/
|
|
168
122
|
NOT_ACCEPTABLE = 406,
|
|
169
123
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
* This is similar to 401 but authentication is needed to be done by a proxy.
|
|
124
|
+
* Authentication by a proxy is required.
|
|
173
125
|
*/
|
|
174
126
|
PROXY_AUTHENTICATION_REQUIRED = 407,
|
|
175
127
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. This response is used much more since some browsers, like Chrome, Firefox 27+, or IE9, use HTTP pre-connection mechanisms to speed up surfing. Also note that some servers merely shut down the connection without sending this message.
|
|
128
|
+
* The server timed out waiting for the request.
|
|
179
129
|
*/
|
|
180
130
|
REQUEST_TIMEOUT = 408,
|
|
181
131
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
* This response is sent when a request conflicts with the current state of the server.
|
|
132
|
+
* The request conflicts with the current state of the server.
|
|
185
133
|
*/
|
|
186
134
|
CONFLICT = 409,
|
|
187
135
|
/**
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
* This response would be sent when the requested content has been permenantly deleted from server, with no forwarding address. Clients are expected to remove their caches and links to the resource. The HTTP specification intends this status code to be used for "limited-time, promotional services". APIs should not feel compelled to indicate resources that have been deleted with this status code.
|
|
136
|
+
* The resource has been permanently deleted with no forwarding address.
|
|
191
137
|
*/
|
|
192
138
|
GONE = 410,
|
|
193
139
|
/**
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
* The server rejected the request because the Content-Length header field is not defined and the server requires it.
|
|
140
|
+
* The server requires a Content-Length header field.
|
|
197
141
|
*/
|
|
198
142
|
LENGTH_REQUIRED = 411,
|
|
199
143
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
* The client has indicated preconditions in its headers which the server does not meet.
|
|
144
|
+
* Preconditions in the client's headers failed.
|
|
203
145
|
*/
|
|
204
146
|
PRECONDITION_FAILED = 412,
|
|
205
147
|
/**
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* Request entity is larger than limits defined by server; the server might close the connection or return an Retry-After header field.
|
|
148
|
+
* Request entity is larger than limits defined by server.
|
|
209
149
|
*/
|
|
210
150
|
REQUEST_TOO_LONG = 413,
|
|
211
151
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
|
|
152
|
+
* The request payload exceeds server size limits.
|
|
153
|
+
* Modern equivalent of REQUEST_TOO_LONG.
|
|
154
|
+
*/
|
|
155
|
+
PAYLOAD_TOO_LARGE = 413,
|
|
156
|
+
/**
|
|
157
|
+
* The URI requested is too long for the server to interpret.
|
|
215
158
|
*/
|
|
216
159
|
REQUEST_URI_TOO_LONG = 414,
|
|
217
160
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
* The media format of the requested data is not supported by the server, so the server is rejecting the request.
|
|
161
|
+
* The server does not support the media type requested by the client.
|
|
221
162
|
*/
|
|
222
163
|
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
223
164
|
/**
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
* The range specified by the Range header field in the request can't be fulfilled; it's possible that the range is outside the size of the target URI's data.
|
|
165
|
+
* The range specified by the Range header cannot be fulfilled.
|
|
227
166
|
*/
|
|
228
167
|
REQUESTED_RANGE_NOT_SATISFIABLE = 416,
|
|
229
168
|
/**
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
* This response code means the expectation indicated by the Expect request header field can't be met by the server.
|
|
169
|
+
* The server cannot meet the expectations given in the Expect header.
|
|
233
170
|
*/
|
|
234
171
|
EXPECTATION_FAILED = 417,
|
|
235
172
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
|
|
173
|
+
* The server refuses to brew coffee because it is a teapot. (April Fools' joke)
|
|
239
174
|
*/
|
|
240
175
|
IM_A_TEAPOT = 418,
|
|
241
176
|
/**
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* The 507 (Insufficient Storage) status code means the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. This condition is considered to be temporary. If the request which received this status code was the result of a user action, the request MUST NOT be repeated until it is requested by a separate user action.
|
|
177
|
+
* The server cannot store the representation needed to complete the request.
|
|
245
178
|
*/
|
|
246
179
|
INSUFFICIENT_SPACE_ON_RESOURCE = 419,
|
|
247
180
|
/**
|
|
248
181
|
* @deprecated
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
* A deprecated response used by the Spring Framework when a method has failed.
|
|
182
|
+
* A method has failed - specific to Spring Framework.
|
|
252
183
|
*/
|
|
253
184
|
METHOD_FAILURE = 420,
|
|
254
185
|
/**
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
* Defined in the specification of HTTP/2 to indicate that a server is not able to produce a response for the combination of scheme and authority that are included in the request URI.
|
|
186
|
+
* The server cannot produce a response for the requested URI scheme and authority.
|
|
258
187
|
*/
|
|
259
188
|
MISDIRECTED_REQUEST = 421,
|
|
260
189
|
/**
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
* The request was well-formed but was unable to be followed due to semantic errors.
|
|
190
|
+
* The request was well-formed but has semantic errors preventing processing.
|
|
264
191
|
*/
|
|
265
192
|
UNPROCESSABLE_ENTITY = 422,
|
|
266
193
|
/**
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
* The resource that is being accessed is locked.
|
|
194
|
+
* The requested resource is locked against access.
|
|
270
195
|
*/
|
|
271
196
|
LOCKED = 423,
|
|
272
197
|
/**
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* The request failed due to failure of a previous request.
|
|
198
|
+
* The request failed due to the failure of a previous request.
|
|
276
199
|
*/
|
|
277
200
|
FAILED_DEPENDENCY = 424,
|
|
278
201
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
|
|
202
|
+
* The client should switch to a different protocol.
|
|
282
203
|
*/
|
|
283
204
|
UPGRADE_REQUIRED = 426,
|
|
284
205
|
/**
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
* The origin server requires the request to be conditional. Intended to prevent the 'lost update' problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.
|
|
206
|
+
* The server requires conditional requests to prevent lost updates.
|
|
288
207
|
*/
|
|
289
208
|
PRECONDITION_REQUIRED = 428,
|
|
290
209
|
/**
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* The user has sent too many requests in a given amount of time ("rate limiting").
|
|
210
|
+
* The client has sent too many requests in a given time period (rate limiting).
|
|
294
211
|
*/
|
|
295
212
|
TOO_MANY_REQUESTS = 429,
|
|
296
213
|
/**
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
* The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
|
|
214
|
+
* Request headers are too large for the server to process.
|
|
300
215
|
*/
|
|
301
216
|
REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
|
|
302
217
|
/**
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
* The user-agent requested a resource that cannot legally be provided, such as a web page censored by a government.
|
|
218
|
+
* Resource cannot be legally provided (e.g., censored by government).
|
|
306
219
|
*/
|
|
307
220
|
UNAVAILABLE_FOR_LEGAL_REASONS = 451,
|
|
308
221
|
/**
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
* The server encountered an unexpected condition that prevented it from fulfilling the request.
|
|
222
|
+
* The server encountered an unexpected error preventing it from fulfilling the request.
|
|
312
223
|
*/
|
|
313
224
|
INTERNAL_SERVER_ERROR = 500,
|
|
314
225
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
* The request method is not supported by the server and cannot be handled. The only methods that servers are required to support (and therefore that must not return this code) are GET and HEAD.
|
|
226
|
+
* The server does not support the functionality required to fulfill the request.
|
|
318
227
|
*/
|
|
319
228
|
NOT_IMPLEMENTED = 501,
|
|
320
229
|
/**
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
* This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
|
|
230
|
+
* The server, acting as a gateway, received an invalid response from an upstream server.
|
|
324
231
|
*/
|
|
325
232
|
BAD_GATEWAY = 502,
|
|
326
233
|
/**
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
* The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.
|
|
234
|
+
* The server is currently unable to handle the request due to temporary overload or maintenance.
|
|
330
235
|
*/
|
|
331
236
|
SERVICE_UNAVAILABLE = 503,
|
|
332
237
|
/**
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
* This error response is given when the server is acting as a gateway and cannot get a response in time.
|
|
238
|
+
* The server, acting as a gateway, did not receive a timely response from an upstream server.
|
|
336
239
|
*/
|
|
337
240
|
GATEWAY_TIMEOUT = 504,
|
|
338
241
|
/**
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
* The HTTP version used in the request is not supported by the server.
|
|
242
|
+
* The server does not support the HTTP protocol version used in the request.
|
|
342
243
|
*/
|
|
343
244
|
HTTP_VERSION_NOT_SUPPORTED = 505,
|
|
344
245
|
/**
|
|
345
|
-
*
|
|
346
|
-
|
|
347
|
-
|
|
246
|
+
* Transparent content negotiation for the request resulted in circular reference.
|
|
247
|
+
*/
|
|
248
|
+
VARIANT_ALSO_NEGOTIATES = 506,
|
|
249
|
+
/**
|
|
250
|
+
* The server cannot store the representation needed to complete the request.
|
|
348
251
|
*/
|
|
349
252
|
INSUFFICIENT_STORAGE = 507,
|
|
350
253
|
/**
|
|
351
|
-
*
|
|
352
|
-
|
|
353
|
-
|
|
254
|
+
* The server detected an infinite loop while processing the request.
|
|
255
|
+
*/
|
|
256
|
+
LOOP_DETECTED = 508,
|
|
257
|
+
/**
|
|
258
|
+
* Further extensions to the request are required for the server to fulfill it.
|
|
259
|
+
*/
|
|
260
|
+
NOT_EXTENDED = 510,
|
|
261
|
+
/**
|
|
262
|
+
* The client needs to authenticate to gain network access.
|
|
354
263
|
*/
|
|
355
264
|
NETWORK_AUTHENTICATION_REQUIRED = 511
|
|
356
265
|
}
|