get

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

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

Example:

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

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

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

See also


Builds a route to match GET requests.

See also