put

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

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

Example:

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

Report a problem


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

Builds a route to match PUT 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:

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

Report a problem


fun Route.put(path: String, body: RoutingHandler): Route

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

Report a problem

See also


Builds a route to match PUT requests.

Report a problem

See also


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

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

Report a problem

See also


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

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

Report a problem

See also