@FunctionalInterface
public interface ContentNegotiationStrategy
Modifier and Type | Field and Description |
---|---|
static java.util.List<MediaType> |
MEDIA_TYPE_ALL_LIST
A singleton list with
MediaType.ALL that is returned from
resolveMediaTypes(org.springframework.web.context.request.NativeWebRequest) when no specific media types are requested. |
Modifier and Type | Method and Description |
---|---|
java.util.List<MediaType> |
resolveMediaTypes(NativeWebRequest webRequest)
Resolve the given request to a list of media types.
|
static final java.util.List<MediaType> MEDIA_TYPE_ALL_LIST
MediaType.ALL
that is returned from
resolveMediaTypes(org.springframework.web.context.request.NativeWebRequest)
when no specific media types are requested.java.util.List<MediaType> resolveMediaTypes(NativeWebRequest webRequest) throws HttpMediaTypeNotAcceptableException
webRequest
- the current requestMEDIA_TYPE_ALL_LIST
if none
were requested.HttpMediaTypeNotAcceptableException
- if the requested media
types cannot be parsed