Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Status.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
6
7 /*
8 ********************************************************************************
9 ********************************* HTTP::IsOK ***********************************
10 ********************************************************************************
11 */
12 constexpr bool IsOK (Status s)
13 {
14 return 200 <= s and s <= 299;
15 }
16
17 /*
18 ********************************************************************************
19 ***************************** HTTP::IsClientError ******************************
20 ********************************************************************************
21 */
22 constexpr bool IsClientError (Status s)
23 {
24 return 400 <= s and s <= 499;
25 }
26
27 /*
28 ********************************************************************************
29 *************************** HTTP::IsServerError ********************************
30 ********************************************************************************
31 */
32 constexpr bool IsServerError (Status s)
33 {
34 return 500 <= s and s <= 599;
35 }
36
37}
constexpr bool IsClientError(Status s)
several status codes considered client error, so check if it is among them
Definition Status.inl:22
constexpr bool IsOK(Status s)
several status codes considered OK, so check if it is among them
Definition Status.inl:12
constexpr bool IsServerError(Status s)
several status codes considered Server Error, so check if it is among them
Definition Status.inl:32