Add handler for unknown status codes
See gh-31202
This commit is contained in:
committed by
rstoyanchev
parent
9c5dcad0e5
commit
d54a694f5a
@@ -88,6 +88,14 @@ public sealed interface HttpStatusCode extends Serializable permits DefaultHttpS
|
||||
return value() == other.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether this status code is a well-known HTTP status code or not
|
||||
* @return {@code true} if the status code corresponds to a standard HTTP status code, {@code false} otherwise
|
||||
*/
|
||||
default boolean isWellKnown() {
|
||||
return HttpStatus.resolve(this.value()) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an {@code HttpStatusCode} object for the given integer value.
|
||||
* @param code the status code as integer
|
||||
|
||||
Reference in New Issue
Block a user