spring-framework / org.springframework.web.reactive.function.server / RouterFunctionDsl / headers

headers

fun headers(headersPredicate: (Headers) -> Boolean, f: (ServerRequest) -> Mono<out ServerResponse>): Unit

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

See Also

RouterFunctions.route

fun headers(headersPredicate: (Headers) -> Boolean): RequestPredicate

Return a {@code RequestPredicate} that tests the request's headers against the given headers predicate.

Parameters

headersPredicate - a predicate that tests against the request headers

Return
a predicate that tests against the given header predicate