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