spring-framework
5.3.39

# accept

fun accept(mediaType: MediaType, f: (ServerRequest) -> Mono<out ServerResponse>)
Content copied to clipboard

Route to the given handler function if the given accept predicate applies.

## See also

org.springframework.web.reactive.function.server.RouterFunctions
fun accept(vararg mediaTypes: MediaType): RequestPredicate
Content copied to clipboard

Return a RequestPredicate that tests if the request's accept header is compatible with any of the given media types.

#### Return

a predicate that tests the request's accept header against the given media types

## Parameters

mediaTypes

the media types to match the request's accept header against