spring-framework / org.springframework.web / HttpMediaTypeNotSupportedException

HttpMediaTypeNotSupportedException

open class HttpMediaTypeNotSupportedException : HttpMediaTypeException

Exception thrown when a client POSTs, PUTs, or PATCHes content of a type not supported by request handler.

Author
Arjen Poutsma

Since
3.0

Constructors

<init>

HttpMediaTypeNotSupportedException(message: String)
HttpMediaTypeNotSupportedException(contentType: MediaType, supportedMediaTypes: MutableList<MediaType>)
HttpMediaTypeNotSupportedException(contentType: MediaType, supportedMediaTypes: MutableList<MediaType>, msg: String)

Create a new HttpMediaTypeNotSupportedException.

Functions

getContentType

open fun getContentType(): MediaType

Return the HTTP request content type method that caused the failure.