public class HeaderContentNegotiationStrategy extends Object implements ContentNegotiationStrategy
ContentNegotiationStrategy
that checks the 'Accept' request header.Constructor and Description |
---|
HeaderContentNegotiationStrategy() |
Modifier and Type | Method and Description |
---|---|
List<org.springframework.http.MediaType> |
resolveMediaTypes(org.springframework.web.context.request.NativeWebRequest request)
Resolve the given request to a list of media types.
|
public List<org.springframework.http.MediaType> resolveMediaTypes(org.springframework.web.context.request.NativeWebRequest request) throws org.springframework.web.HttpMediaTypeNotAcceptableException
resolveMediaTypes
in interface ContentNegotiationStrategy
request
- the current requestnull
)org.springframework.web.HttpMediaTypeNotAcceptableException
- if the 'Accept' header cannot be parsedCopyright © 2006–2018 TinyGroup. All rights reserved.