public class HeaderContentNegotiationStrategy extends java.lang.Object implements ContentNegotiationStrategy
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ACCEPT_HEADER |
Constructor and Description |
---|
HeaderContentNegotiationStrategy() |
Modifier and Type | Method and Description |
---|---|
java.util.List<MediaType> |
resolveMediaTypes(NativeWebRequest webRequest)
Resolve the given request to a list of media types.
|
private static final java.lang.String ACCEPT_HEADER
public java.util.List<MediaType> resolveMediaTypes(NativeWebRequest webRequest) throws HttpMediaTypeNotAcceptableException
resolveMediaTypes
in interface ContentNegotiationStrategy
webRequest
- the current requestnull
HttpMediaTypeNotAcceptableException
- if the 'Accept' header cannot be parsed.