getStatusMessage static method
Implementation
static String getStatusMessage(int statusCode) {
switch (statusCode) {
case 200:
return 'OK';
case 201:
return 'Created';
case 202:
return 'Accepted';
case 204:
return 'No Content';
case 400:
return 'Bad Request';
case 401:
return 'Unauthorized';
case 403:
return 'Forbidden';
case 404:
return 'Not Found';
case 405:
return 'Method Not Allowed';
case 408:
return 'Request Timeout';
case 429:
return 'Too Many Requests';
case 500:
return 'Internal Server Error';
case 502:
return 'Bad Gateway';
case 503:
return 'Service Unavailable';
case 504:
return 'Gateway Timeout';
default:
return 'Unknown';
}
}