程序包 cn.taketoday.web
类 HttpMediaTypeNotSupportedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cn.taketoday.core.NestedRuntimeException
cn.taketoday.web.HttpMediaTypeException
cn.taketoday.web.HttpMediaTypeNotSupportedException
- 所有已实现的接口:
HttpStatusCodeProvider,ErrorResponse,Serializable
Exception thrown when a client POSTs, PUTs, or PATCHes content of a type
not supported by request handler.
- 从以下版本开始:
- 4.0 2022/1/22 20:16
- 作者:
- Arjen Poutsma, Harry Yang
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> mediaTypes, HttpMethod httpMethod) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(MediaType contentType, List<MediaType> supportedMediaTypes, HttpMethod httpMethod, String message) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(String message) Create a new HttpMediaTypeNotSupportedException.HttpMediaTypeNotSupportedException(String message, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException. -
方法概要
修饰符和类型方法说明Return the HTTP request content type method that caused the failure.Return headers to use for the response.Return the HTTP status code to use for the response.从类继承的方法 cn.taketoday.web.HttpMediaTypeException
getBody, getSupportedMediaTypes从类继承的方法 cn.taketoday.core.NestedRuntimeException
contains, getMostSpecificCause, getNestedMessage, getRootCause
-
字段详细资料
-
contentType
-
httpMethod
-
-
构造器详细资料
-
HttpMediaTypeNotSupportedException
Create a new HttpMediaTypeNotSupportedException.- 参数:
message- the exception message
-
HttpMediaTypeNotSupportedException
Create a new HttpMediaTypeNotSupportedException.- 参数:
message- the exception messagemediaTypes- list of supported media types
-
HttpMediaTypeNotSupportedException
public HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> mediaTypes) Create a new HttpMediaTypeNotSupportedException.- 参数:
contentType- the unsupported content typemediaTypes- the list of supported media types
-
HttpMediaTypeNotSupportedException
public HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> mediaTypes, @Nullable HttpMethod httpMethod) Create a new HttpMediaTypeNotSupportedException.- 参数:
contentType- the unsupported content typemediaTypes- the list of supported media typeshttpMethod- the HTTP method of the request
-
HttpMediaTypeNotSupportedException
public HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> supportedMediaTypes, @Nullable HttpMethod httpMethod, String message) Create a new HttpMediaTypeNotSupportedException.- 参数:
contentType- the unsupported content typesupportedMediaTypes- the list of supported media typeshttpMethod- the HTTP method of the requestmessage- the detail message
-
-
方法详细资料
-
getContentType
Return the HTTP request content type method that caused the failure. -
getStatusCode
从接口复制的说明:ErrorResponseReturn the HTTP status code to use for the response. -
getHeaders
从接口复制的说明:ErrorResponseReturn headers to use for the response.
-