9
9
/* *
10
10
* \file
11
11
* \brief Constants for the HTTP error status.
12
+ *
13
+ * http://tools.ietf.org/html/rfc6585
14
+ * http://httpstatus.es/
12
15
*/
13
16
14
17
#include < string>
@@ -61,6 +64,9 @@ namespace network {
61
64
UNSUPPORTED_MEDIA_TYPE = 415 ,
62
65
REQUEST_RANGE_NOT_SATISFIABLE = 416 ,
63
66
EXPECTATION_FAILED = 417 ,
67
+ PRECONDITION_REQUIRED = 428 ,
68
+ TOO_MANY_REQUESTS = 429 ,
69
+ REQUEST_HEADER_FIELDS_TOO_LARGE = 431 ,
64
70
65
71
// server error
66
72
INTERNAL_ERROR = 500 ,
@@ -69,6 +75,7 @@ namespace network {
69
75
SERVICE_UNAVAILABLE = 503 ,
70
76
GATEWAY_TIMEOUT = 504 ,
71
77
HTTP_VERSION_NOT_SUPPORTED = 505 ,
78
+ NETWORK_AUTHENTICATION_REQUIRED = 511 ,
72
79
};
73
80
} // namespace status
74
81
} // namespace v2
@@ -126,12 +133,16 @@ namespace network {
126
133
{code::UNSUPPORTED_MEDIA_TYPE, " Unsupported Media Type" },
127
134
{code::REQUEST_RANGE_NOT_SATISFIABLE, " Request Range Not Satisfiable" },
128
135
{code::EXPECTATION_FAILED, " Expectation Failed" },
136
+ {code::PRECONDITION_REQUIRED, " Precondition Required" },
137
+ {code::TOO_MANY_REQUESTS, " Too Many Requests" },
138
+ {code::REQUEST_HEADER_FIELDS_TOO_LARGE, " Request Header Fields Too Large" },
129
139
{code::INTERNAL_ERROR, " Internal Error" },
130
140
{code::NOT_IMPLEMENTED, " Not Implemented" },
131
141
{code::BAD_GATEWAY, " Bad Gateway" },
132
142
{code::SERVICE_UNAVAILABLE, " Service Unavailable" },
133
143
{code::GATEWAY_TIMEOUT, " Gateway Timeout" },
134
144
{code::HTTP_VERSION_NOT_SUPPORTED, " HTTP Version Not Supported" },
145
+ {code::NETWORK_AUTHENTICATION_REQUIRED, " Network Authentication Required" },
135
146
};
136
147
137
148
auto it = status_messages.find (status_code);
0 commit comments