spring-framework / org.springframework.web.server / MethodNotAllowedException

MethodNotAllowedException

open class MethodNotAllowedException : ResponseStatusException

Exception for errors that fit response status 405 (method not allowed).

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

MethodNotAllowedException(method: HttpMethod, supportedMethods: MutableCollection<HttpMethod>)
MethodNotAllowedException(method: String, supportedMethods: MutableCollection<HttpMethod>)

Functions

getHttpMethod

open fun getHttpMethod(): String

Return the HTTP method for the failed request.

getSupportedMethods

open fun getSupportedMethods(): MutableSet<HttpMethod>

Return the list of supported HTTP methods.