public class NotAcceptableStatusException extends ResponseStatusException
| Constructor and Description |
|---|
NotAcceptableStatusException(List<MediaType> supportedMediaTypes)
Constructor for when the requested Content-Type is not supported.
|
NotAcceptableStatusException(String reason)
Constructor for when the requested Content-Type is invalid.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getHeaders()
Return a Map with an "Accept" header.
|
HttpHeaders |
getResponseHeaders()
Return HttpHeaders with an "Accept" header, or an empty instance.
|
List<MediaType> |
getSupportedMediaTypes()
Return the list of supported content types in cases when the Accept
header is parsed but not supported, or an empty list otherwise.
|
getMessage, getRawStatusCode, getReason, getStatuscontains, getMostSpecificCause, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic NotAcceptableStatusException(String reason)
public Map<String,String> getHeaders()
getHeaders in class ResponseStatusExceptionpublic HttpHeaders getResponseHeaders()
getResponseHeaders in class ResponseStatusException