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

MediaTypeNotSupportedStatusException

open class MediaTypeNotSupportedStatusException : ResponseStatusException

Exception for errors that fit response status 415 (unsupported media type).

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

MediaTypeNotSupportedStatusException(reason: String)

Constructor for when the Content-Type is invalid.

MediaTypeNotSupportedStatusException(supportedMediaTypes: MutableList<MediaType>)

Constructor for when the Content-Type is not supported.

Functions

getSupportedMediaTypes

open fun getSupportedMediaTypes(): MutableList<MediaType>

Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.