程序包 cn.taketoday.web

类 NotAcceptableStatusException

所有已实现的接口:
HttpStatusCodeProvider, ErrorResponse, Serializable

public class NotAcceptableStatusException extends ResponseStatusException
Exception for errors that fit response status 406 (not acceptable).
从以下版本开始:
4.0 2022/3/2 16:20
作者:
Rossen Stoyanchev, Harry Yang
另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • supportedMediaTypes

      private final List<MediaType> supportedMediaTypes
  • 构造器详细资料

    • NotAcceptableStatusException

      public NotAcceptableStatusException(String reason)
      Constructor for when the requested Content-Type is invalid.
    • NotAcceptableStatusException

      public NotAcceptableStatusException(List<MediaType> mediaTypes)
      Constructor for when the requested Content-Type is not supported.
  • 方法详细资料

    • getHeaders

      public HttpHeaders getHeaders()
      Return HttpHeaders with an "Accept" header that documents the supported media types, if available, or an empty instance otherwise.
      指定者:
      getHeaders 在接口中 ErrorResponse
      覆盖:
      getHeaders 在类中 ResponseStatusException
    • getSupportedMediaTypes

      public List<MediaType> getSupportedMediaTypes()
      Return the list of supported content types in cases when the Accept header is parsed but not supported, or an empty list otherwise.