You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/StatusCode/index.ts
+38-26Lines changed: 38 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -102,107 +102,119 @@ export enum StatusCode {
102
102
*/
103
103
PERMANENT_REDIRECT=308,
104
104
/**
105
-
* @description- @
105
+
* @descriptionThe server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
106
106
*/
107
107
BAD_REQUEST=400,
108
108
/**
109
-
* @description- @
109
+
* @descriptionAlthough the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
110
110
*/
111
111
UNAUTHORIZED=401,
112
112
/**
113
-
* @description- @
113
+
* @descriptionThis response code is reserved for future use. The initial aim for creating this code was using it for digital payment systems, however this status code is used very rarely and no standard convention exists.
114
114
*/
115
115
PAYMENT_REQUIRED=402,
116
116
/**
117
-
* @description- @
117
+
* @descriptionThe client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
118
118
*/
119
119
FORBIDDEN=403,
120
120
/**
121
-
* @description- @
121
+
* @descriptionThe server can not find the 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 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.
122
122
*/
123
123
NOT_FOUND=404,
124
124
/**
125
-
* @description- @
125
+
* @descriptionThe request method is known by the server but is not supported by the target resource. For example, an API may not allow calling DELETE to remove a resource.
126
126
*/
127
127
METHOD_NOT_ALLOWED=405,
128
128
/**
129
-
* @description- @
129
+
* @descriptionThis response is sent when the web server, after performing server-driven content negotiation, doesn't find any content that conforms to the criteria given by the user agent.
130
130
*/
131
131
NOT_ACCEPTABLE=406,
132
132
/**
133
-
* @description- @
133
+
* @descriptionThis is similar to 401 Unauthorized but authentication is needed to be done by a proxy.
134
134
*/
135
135
PROXY_AUTHENTICATION_REQUIRED=407,
136
136
/**
137
-
* @description- @
137
+
* @descriptionThis 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.
138
138
*/
139
139
REQUEST_TIMEOUT=408,
140
140
/**
141
-
* @description- @
141
+
* @descriptionThis response is sent when a request conflicts with the current state of the server.
142
142
*/
143
143
CONFLICT=409,
144
144
/**
145
-
* @description- @
145
+
* @descriptionThis response is sent when the requested content has been permanently 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.
146
146
*/
147
147
GONE=410,
148
148
/**
149
-
* @description- @
149
+
* @descriptionServer rejected the request because the Content-Length header field is not defined and the server requires it.
150
150
*/
151
151
LENGTH_REQUIRED=411,
152
152
/**
153
-
* @description- @
153
+
* @descriptionThe client has indicated preconditions in its headers which the server does not meet.
154
154
*/
155
155
PRECONDITION_FAILED=412,
156
156
/**
157
-
* @description- @
157
+
* @descriptionRequest entity is larger than limits defined by server. The server might close the connection or return an Retry-After header field.
158
158
*/
159
159
PAYLOAD_TOO_LARGE=413,
160
160
/**
161
-
* @description- @
161
+
* @descriptionThe URI requested by the client is longer than the server is willing to interpret.
162
162
*/
163
163
URI_TOO_LONG=414,
164
164
/**
165
-
* @description- @
165
+
* @descriptionThe media format of the requested data is not supported by the server, so the server is rejecting the request.
166
166
*/
167
167
UNSUPPORTED_MEDIA_TYPE=415,
168
168
/**
169
-
* @description- @
169
+
* @descriptionThe range specified by the Range header field in the request cannot be fulfilled. It's possible that the range is outside the size of the target URI's data.
170
170
*/
171
171
RANGE_NOT_SATISFIABLE=416,
172
172
/**
173
-
* @description- @
173
+
* @descriptionThis response code means the expectation indicated by the Expect request header field cannot be met by the server.
174
174
*/
175
175
EXPECTATION_FAILED=417,
176
176
/**
177
-
* @description- @
177
+
* @descriptionThe server refuses the attempt to brew coffee with a teapot.
178
178
*/
179
179
IM_A_TEAPOT=418,
180
180
/**
181
-
* @description - @
181
+
* @description The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI.
182
+
*/
183
+
MISDIRECTED_REQUEST=421,
184
+
/**
185
+
* @description The request was well-formed but was unable to be followed due to semantic errors.
182
186
*/
183
187
UNPROCESSABLE_ENTITY=422,
184
188
/**
185
-
* @description - @
189
+
* @description The resource that is being accessed is locked.
190
+
*/
191
+
LOCKED=423,
192
+
/**
193
+
* @description The request failed due to failure of a previous request.
194
+
*/
195
+
FAILED_DEPENDENCY=424,
196
+
/**
197
+
* @description Indicates that the server is unwilling to risk processing a request that might be replayed.
186
198
*/
187
199
TOO_EARLY=425,
188
200
/**
189
-
* @description- @
201
+
* @descriptionThe 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. The server sends an Upgrade header in a 426 response to indicate the required protocol(s).
190
202
*/
191
203
UPGRADE_REQUIRED=426,
192
204
/**
193
-
* @description- @
205
+
* @descriptionThe origin server requires the request to be conditional. This response is 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.
194
206
*/
195
207
PRECONDITION_REQUIRED=428,
196
208
/**
197
-
* @description- @
209
+
* @descriptionThe user has sent too many requests in a given amount of time ("rate limiting").
198
210
*/
199
211
TOO_MANY_REQUESTS=429,
200
212
/**
201
-
* @description- @
213
+
* @descriptionThe 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.
202
214
*/
203
215
REQUEST_HEADER_FIELDS_TOO_LARGE=431,
204
216
/**
205
-
* @description- @
217
+
* @descriptionThe user agent requested a resource that cannot legally be provided, such as a web page censored by a government.
PERMANENT_REDIRECT="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
92
/**
93
-
* @description - StatusCode =
93
+
* @description - StatusCode = 400
94
94
*/
95
95
BAD_REQUEST="The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
96
96
/**
97
-
* @description - StatusCode =
97
+
* @description - StatusCode = 401
98
98
*/
99
99
UNAUTHORIZED="Although the HTTP standard specifies `unauthorized`, semantically this response means 'unauthenticated'. That is, the client must authenticate itself to get the requested response.",
100
100
/**
101
-
* @description - StatusCode =
101
+
* @description - StatusCode = 402
102
102
*/
103
103
PAYMENT_REQUIRED="This response code is reserved for future use. The initial aim for creating this code was using it for digital payment systems, however this status code is used very rarely and no standard convention exists.",
104
104
/**
105
-
* @description - StatusCode =
105
+
* @description - StatusCode = 403
106
106
*/
107
107
FORBIDDEN="The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.",
108
108
/**
109
-
* @description - StatusCode 404
109
+
* @description - StatusCode = 404
110
110
*/
111
111
NOT_FOUND="The server can not find the 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 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.",
112
112
/**
113
-
* @description - StatusCode =
113
+
* @description - StatusCode = 405
114
114
*/
115
115
METHOD_NOT_ALLOWED="The request method is known by the server but is not supported by the target resource. For example, an API may not allow calling DELETE to remove a resource.",
116
116
/**
117
-
* @description - StatusCode =
117
+
* @description - StatusCode = 406
118
118
*/
119
119
NOT_ACCEPTABLE="This response is sent when the web server, after performing server-driven content negotiation, doesn't find any content that conforms to the criteria given by the user agent.",
120
120
/**
121
-
* @description - StatusCode =
121
+
* @description - StatusCode = 407
122
122
*/
123
123
PROXY_AUTHENTICATION_REQUIRED="This is similar to 401 Unauthorized but authentication is needed to be done by a proxy.",
124
124
/**
125
-
* @description - StatusCode =
125
+
* @description - StatusCode = 408
126
126
*/
127
-
REQUEST_TIMEOUT="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.",
127
+
REQUEST_TIMEOUT="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.",
128
128
/**
129
-
* @description - StatusCode =
129
+
* @description - StatusCode = 409
130
130
*/
131
131
CONFLICT="This response is sent when a request conflicts with the current state of the server.",
132
132
/**
133
-
* @description - StatusCode =
133
+
* @description - StatusCode = 410
134
134
*/
135
135
GONE="This response is sent when the requested content has been permanently 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
136
/**
137
-
* @description - StatusCode =
137
+
* @description - StatusCode = 411
138
138
*/
139
139
LENGTH_REQUIRED="Server rejected the request because the Content-Length header field is not defined and the server requires it.",
140
140
/**
141
-
* @description - StatusCode =
141
+
* @description - StatusCode = 412
142
142
*/
143
143
PRECONDITION_FAILED="The client has indicated preconditions in its headers which the server does not meet.",
144
144
/**
145
-
* @description - StatusCode =
145
+
* @description - StatusCode = 413
146
146
*/
147
147
PAYLOAD_TOO_LARGE="Request entity is larger than limits defined by server. The server might close the connection or return an Retry-After header field.",
148
148
/**
149
-
* @description - StatusCode =
149
+
* @description - StatusCode = 414
150
150
*/
151
151
URI_TOO_LONG="The URI requested by the client is longer than the server is willing to interpret",
152
152
/**
153
-
* @description - StatusCode =
153
+
* @description - StatusCode = 415
154
154
*/
155
155
UNSUPPORTED_MEDIA_TYPE="The media format of the requested data is not supported by the server, so the server is rejecting the request.",
156
156
/**
157
-
* @description - StatusCode =
157
+
* @description - StatusCode = 416
158
158
*/
159
159
RANGE_NOT_SATISFIABLE="The range specified by the Range header field in the request cannot be fulfilled. It's possible that the range is outside the size of the target URI's data.",
160
160
/**
161
-
* @description - StatusCode =
161
+
* @description - StatusCode = 417
162
162
*/
163
163
EXPECTATION_FAILED="This response code means the expectation indicated by the Expect request header field cannot be met by the server.",
164
164
/**
165
-
* @description - StatusCode 418
165
+
* @description - StatusCode = 418
166
166
*/
167
167
IM_A_TEAPOT="The server refuses the attempt to brew coffee with a teapot.",
168
168
/**
169
-
* @description - StatusCode =
169
+
* @description - StatusCode = 421
170
+
*/
171
+
MISDIRECTED_REQUEST="The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI.",
172
+
/**
173
+
* @description - StatusCode = 422
170
174
*/
171
175
UNPROCESSABLE_ENTITY="The request was well-formed but was unable to be followed due to semantic errors.",
172
176
/**
173
-
* @description - StatusCode =
177
+
* @description - StatusCode = 423
178
+
*/
179
+
LOCKED="The resource that is being accessed is locked.",
180
+
/**
181
+
* @description - StatusCode = 424
182
+
*/
183
+
FAILED_DEPENDENCY="The request failed due to failure of a previous request.",
184
+
/**
185
+
* @description - StatusCode = 425
174
186
*/
175
187
TOO_EARLY="Indicates that the server is unwilling to risk processing a request that might be replayed.",
176
188
/**
177
-
* @description - StatusCode =
189
+
* @description - StatusCode = 426
178
190
*/
179
191
UPGRADE_REQUIRED="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. The server sends an Upgrade header in a 426 response to indicate the required protocol(s).",
180
192
/**
181
-
* @description - StatusCode =
193
+
* @description - StatusCode = 428
182
194
*/
183
195
PRECONDITION_REQUIRED="The origin server requires the request to be conditional. This response is 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.",
184
196
/**
185
-
* @description - StatusCode =
197
+
* @description - StatusCode = 429
186
198
*/
187
199
TOO_MANY_REQUESTS="The user has sent too many requests in a given amount of time (`rate limiting`).",
188
200
/**
189
-
* @description - StatusCode =
201
+
* @description - StatusCode = 431
190
202
*/
191
203
REQUEST_HEADER_FIELDS_TOO_LARGE="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.",
192
204
/**
193
-
* @description - StatusCode =
205
+
* @description - StatusCode = 451
194
206
*/
195
207
UNAVAILABLE_FOR_LEGAL_REASONS="The user agent requested a resource that cannot legally be provided, such as a web page censored by a government.",
0 commit comments