public class MethodNotAllowedException extends ResponseStatusException
Constructor and Description |
---|
MethodNotAllowedException(HttpMethod method,
Collection<HttpMethod> supportedMethods) |
MethodNotAllowedException(String method,
Collection<HttpMethod> supportedMethods) |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getHeaders()
Return a Map with an "Allow" header.
|
String |
getHttpMethod()
Return the HTTP method for the failed request.
|
HttpHeaders |
getResponseHeaders()
Return HttpHeaders with an "Allow" header.
|
Set<HttpMethod> |
getSupportedMethods()
Return the list of supported HTTP methods.
|
getMessage, getReason, getStatus
contains, getMostSpecificCause, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MethodNotAllowedException(HttpMethod method, Collection<HttpMethod> supportedMethods)
public MethodNotAllowedException(String method, @Nullable Collection<HttpMethod> supportedMethods)
public Map<String,String> getHeaders()
getHeaders
in class ResponseStatusException
public HttpHeaders getResponseHeaders()
getResponseHeaders
in class ResponseStatusException
public String getHttpMethod()
public Set<HttpMethod> getSupportedMethods()