Class MethodNotAllowedException

All Implemented Interfaces:
Serializable, ErrorResponse

public class MethodNotAllowedException extends ResponseStatusException
Exception for errors that fit response status 405 (method not allowed).
Since:
5.0
Author:
Rossen Stoyanchev
See Also:
  • Constructor Details

  • Method Details

    • getHeaders

      public HttpHeaders getHeaders()
      Return HttpHeaders with an "Allow" header that documents the allowed HTTP methods for this URL, if available, or an empty instance otherwise.
      Specified by:
      getHeaders in interface ErrorResponse
      Overrides:
      getHeaders in class ResponseStatusException
    • getHttpMethod

      public String getHttpMethod()
      Return the HTTP method for the failed request.
    • getSupportedMethods

      public Set<HttpMethod> getSupportedMethods()
      Return the list of supported HTTP methods.