patch

fun Route.patch(path: Regex, body: RoutingHandler): Route

Builds a route to match PATCH requests with the specified regex path. Named parameters from regex can be accessed via ApplicationCall.parameters.

Example:

patch(Regex("/(?<name>.+)/hello")) {
val name = call.parameters["name"]
...
}

@JvmName(name = "patchTypedPath")
inline fun <R : Any> Route.patch(path: Regex, crossinline body: suspend RoutingContext.(R) -> Unit): Route

Builds a route to match PATCH requests with the specified regex path receiving a request body as content of the R type. Named parameters from regex can be accessed via ApplicationCall.parameters.

Example:

patch<String>(Regex("/(?<name>.+)/hello")) {
val name = call.parameters["name"]
...
}

Builds a route to match PATCH requests with the specified path.

See also


Builds a route to match PATCH requests.

See also


@JvmName(name = "patchTyped")
inline fun <R : Any> Route.patch(crossinline body: suspend RoutingContext.(R) -> Unit): Route

Builds a route to match PATCH requests receiving a request body as content of the R type.

See also


@JvmName(name = "patchTypedPath")
inline fun <R : Any> Route.patch(path: String, crossinline body: suspend RoutingContext.(R) -> Unit): Route

Builds a route to match PATCH requests with the specified path receiving a request body as content of the R type.

See also