method

fun method(httpMethod: HttpMethod, f: suspend (ServerRequest) -> ServerResponse)

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

See also


fun method(httpMethod: HttpMethod): RequestPredicate

Return a RequestPredicate that tests against the given HTTP method.

Return

a predicate that tests against the given HTTP method

Parameters

httpMethod

the HTTP method to match to