类 HeaderContentNegotiationStrategy
java.lang.Object
cn.taketoday.web.accept.HeaderContentNegotiationStrategy
- 所有已实现的接口:
ContentNegotiationStrategy
A
ContentNegotiationStrategy that checks the 'Accept' request header.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Juergen Hoeller
-
字段概要
从接口继承的字段 cn.taketoday.web.accept.ContentNegotiationStrategy
MEDIA_TYPE_ALL_LIST -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明resolveMediaTypes(RequestContext request) Resolve the given request to a list of media types.
-
构造器详细资料
-
HeaderContentNegotiationStrategy
public HeaderContentNegotiationStrategy()
-
-
方法详细资料
-
resolveMediaTypes
public List<MediaType> resolveMediaTypes(RequestContext request) throws HttpMediaTypeNotAcceptableException Resolve the given request to a list of media types. The returned list is ordered by specificity first and by quality parameter second.- 指定者:
resolveMediaTypes在接口中ContentNegotiationStrategy- 参数:
request- the current request context- 返回:
- 抛出:
HttpMediaTypeNotAcceptableException- if the 'Accept' header cannot be parsed
-