Added not authorized HTTP status code.

This commit is contained in:
Christian P. MOMON 2023-01-06 23:08:10 +01:00
parent 999b61d3be
commit dcc266a41d

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Christian Pierre MOMON <christian@momon.org>
* Copyright (C) 2021-2022 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of StatoolInfos, simple service statistics tool.
*
@ -75,6 +75,13 @@ public enum HttpStatusCategory
return result;
}
/**
* Checks if is success.
*
* @param httpCode
* the http code
* @return true, if is success
*/
public static boolean isSuccess(final int httpCode)
{
boolean result;
@ -85,6 +92,23 @@ public enum HttpStatusCategory
return result;
}
/**
* Checks if is unauthorized.
*
* @param httpCode
* the http code
* @return true, if is unauthorized
*/
public static boolean isUnauthorized(final int httpCode)
{
boolean result;
result = (httpCode == 401);
//
return result;
}
/**
* Value of.
*