Molybden API
Loading...
Searching...
No Matches
http_status_code.hpp
1// Copyright (c) 2000-2023 TeamDev Ltd. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_HTTP_STATUS_CODE_HPP
6#define MOLYBDEN_HTTP_STATUS_CODE_HPP
7
8#include <string>
9
10namespace molybden {
11
15using HttpStatusCode = int32_t;
16
17// Informational 1xx
18static const HttpStatusCode kContinue = 100;
19static const HttpStatusCode kSwitchingProtocols = 101;
20static const HttpStatusCode kEarlyHints = 103;
21
22// Successful 2xx
23static const HttpStatusCode kOk = 200;
24static const HttpStatusCode kCreated = 201;
25static const HttpStatusCode kAccepted = 202;
26static const HttpStatusCode kNonAuthoritativeInformation = 203;
27static const HttpStatusCode kNoContent = 204;
28static const HttpStatusCode kResetContent = 205;
29static const HttpStatusCode kPartialContent = 206;
30
31// Redirection 3xx
32static const HttpStatusCode kMultipleChoices = 300;
33static const HttpStatusCode kMovedP = 301;
34static const HttpStatusCode kFound = 302;
35static const HttpStatusCode kSeeOther = 303;
36static const HttpStatusCode kNotModified = 304;
37static const HttpStatusCode kUseProxy = 305;
38static const HttpStatusCode kTemporaryRedirect = 307;
39static const HttpStatusCode kPermanentRedirect = 308;
40
41// Client error 4xx
42static const HttpStatusCode kBadRequest = 400;
43static const HttpStatusCode kUnauthorized = 401;
44static const HttpStatusCode kPaymentRequired = 402;
45static const HttpStatusCode kForbidden = 403;
46static const HttpStatusCode kNotFound = 404;
47static const HttpStatusCode kMethodNotAllow = 405;
48static const HttpStatusCode kNotAcceptable = 406;
49static const HttpStatusCode kProxyAuthenticationRequired = 407;
50static const HttpStatusCode kRequestTimeout = 408;
51static const HttpStatusCode kConflict = 409;
52static const HttpStatusCode kGone = 410;
53static const HttpStatusCode kLengthRequired = 411;
54static const HttpStatusCode kPreconditionFailed = 412;
55static const HttpStatusCode kRequestEntityTooLarge = 413;
56static const HttpStatusCode kRequestUriTooLong = 414;
57static const HttpStatusCode kUnsupportedMediaType = 415;
58static const HttpStatusCode kRequestedRangeNotSatisfiable = 416;
59static const HttpStatusCode kExpectationFailed = 417;
60static const HttpStatusCode kInvalidXPrivetToken = 418;
61static const HttpStatusCode kTooEarly = 425;
62
63// Server error 5xx
64static const HttpStatusCode kInternalServerError = 500;
65static const HttpStatusCode kNotImplemented = 501;
66static const HttpStatusCode kBadGateway = 502;
67static const HttpStatusCode kServiceUnavailable = 503;
68static const HttpStatusCode kGatewayTimeout = 504;
69static const HttpStatusCode kVersionNotSupported = 505;
70
71} // namespace molybden
72
73#endif // MOLYBDEN_HTTP_STATUS_CODE_HPP