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

method

fun method(httpMethod: HttpMethod, f: suspend (ServerRequest) -> 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 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