Interface RequestedContentTypeResolver
- All Known Implementing Classes:
FixedContentTypeResolver,HeaderContentTypeResolver,ParameterContentTypeResolver
public interface RequestedContentTypeResolver
Strategy to resolve the requested media types for a
ServerWebExchange.
See RequestedContentTypeResolverBuilder to create a sequence of
strategies.
- Since:
- 5.0
- Author:
- Rossen Stoyanchev
-
Field Summary
FieldsModifier and TypeFieldDescriptionA singleton list withMediaType.ALLthat is returned fromresolveMediaTypes(org.springframework.web.server.ServerWebExchange)when no specific media types are requested. -
Method Summary
Modifier and TypeMethodDescriptionresolveMediaTypes(ServerWebExchange exchange) Resolve the given request to a list of requested media types.
-
Field Details
-
MEDIA_TYPE_ALL_LIST
A singleton list withMediaType.ALLthat is returned fromresolveMediaTypes(org.springframework.web.server.ServerWebExchange)when no specific media types are requested.- Since:
- 5.0.5
-
-
Method Details
-
resolveMediaTypes
Resolve the given request to a list of requested media types. The returned list is ordered by specificity first and by quality parameter second.- Parameters:
exchange- the current exchange- Returns:
- the requested media types, or
MEDIA_TYPE_ALL_LISTif none were requested. - Throws:
NotAcceptableStatusException- if the requested media type is invalid
-