// Eg 503 -> 500 // Eg 555 -> 500 int getStatusRange(const int status) { return (status / 100) * 100; }A 1xx status is informational. A 2xx status is success. A 3xx status is redirection. A 4xx status is client error. A 5xx status is server error.
Programming Tips - C/C++: Convert a HTTP status number into a range
Date: 2015aug19
Language: C/C++
Q. C/C++: Convert a HTTP status number into a range
A.