程序包 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

public class HttpMediaTypeNotSupportedException extends HttpMediaTypeException
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
另请参阅:
  • 字段详细资料

    • contentType

      @Nullable private final MediaType contentType
    • httpMethod

      @Nullable private final HttpMethod httpMethod
  • 构造器详细资料

    • HttpMediaTypeNotSupportedException

      public HttpMediaTypeNotSupportedException(String message)
      Create a new HttpMediaTypeNotSupportedException.
      参数:
      message - the exception message
    • HttpMediaTypeNotSupportedException

      public HttpMediaTypeNotSupportedException(String message, List<MediaType> mediaTypes)
      Create a new HttpMediaTypeNotSupportedException.
      参数:
      message - the exception message
      mediaTypes - list of supported media types
    • HttpMediaTypeNotSupportedException

      public HttpMediaTypeNotSupportedException(@Nullable MediaType contentType, List<MediaType> mediaTypes)
      Create a new HttpMediaTypeNotSupportedException.
      参数:
      contentType - the unsupported content type
      mediaTypes - 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 type
      mediaTypes - the list of supported media types
      httpMethod - 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 type
      supportedMediaTypes - the list of supported media types
      httpMethod - the HTTP method of the request
      message - the detail message
  • 方法详细资料

    • getContentType

      @Nullable public MediaType getContentType()
      Return the HTTP request content type method that caused the failure.
    • getStatusCode

      public HttpStatus getStatusCode()
      从接口复制的说明: ErrorResponse
      Return the HTTP status code to use for the response.
    • getHeaders

      public HttpHeaders getHeaders()
      从接口复制的说明: ErrorResponse
      Return headers to use for the response.