call method
Implementation
HTTPCodes call(int? statusCode) {
final error = validationError +
authorizationError +
authenticationError +
resourceNotFoundError +
methodNotAllowedError;
if (success.contains(statusCode)) return HTTPCodes.success;
if (error.contains(statusCode)) return HTTPCodes.error;
if (invalidToken.contains(statusCode)) return HTTPCodes.invalidToken;
if (serviceNotAvailable.contains(statusCode)) {
return HTTPCodes.serviceNotAvailable;
} else {
return HTTPCodes.unknown;
}
}