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

method

fun method(httpMethod: HttpMethod, f: (ServerRequest) -> Mono<ServerResponse>): Unit

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

See Also

RouterFunctions.route

fun method(httpMethod: HttpMethod): RequestPredicate

Return a {@code RequestPredicate} that tests against the given HTTP method.

Parameters

httpMethod - the HTTP method to match to

Return
a predicate that tests against the given HTTP method