1use bytes::Bytes;
2use http_body_util::combinators::BoxBody;
3use hyper::{Request, Response};
4use std::convert::Infallible;
5
6pub enum HTTPStatusCode {
7 OK = 200,
8 Created = 201,
9 Accepted = 202,
10 NoContent = 204,
11 BadRequest = 400,
12 Unauthorized = 401,
13 Forbidden = 403,
14 NotFound = 404,
15 MethodNotAllowed = 405,
16 NotAcceptable = 406,
17 ProxyAuthenticationRequired = 407,
18 RequestTimeout = 408,
19 Conflict = 409,
20 Gone = 410,
21 LengthRequired = 411,
22 PreconditionFailed = 412,
23 PayloadTooLarge = 413,
24 URITooLong = 414,
25 UnsupportedMediaType = 415,
26 RangeNotSatisfiable = 416,
27 ExpectationFailed = 417,
28 ImATeapot = 418,
29 MisdirectedRequest = 421,
30 UnprocessableEntity = 422,
31 Locked = 423,
32 FailedDependency = 424,
33 TooEarly = 425,
34 UpgradeRequired = 426,
35 PreconditionRequired = 428,
36 TooManyRequests = 429,
37 RequestHeaderFieldsTooLarge = 431,
38 UnavailableForLegalReasons = 451,
39 InternalServerError = 500,
40}
41
42pub type RespBody = BoxBody<Bytes, Infallible>;
43pub type Resp = Response<RespBody>;
44pub type Req = Request<RespBody>;