post

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

Example:

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

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

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

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

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

See also


@JvmName(name = "postTyped")
inline fun <R : Any> Routing.post(crossinline body: suspend RoutingContext.(R) -> Unit): Routing

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

See also


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

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

See also


Builds a route to match POST requests.

See also