get

abstract fun get(path: String, getRouting: HttpServerCall.(CoroutineScope) -> Job): HttpServerRoute

get 是一个便捷方法,用于创建一个匹配 GET 请求和指定路径的路由。

Return

返回当前的 HttpServerRoute 实例,以支持链式调用。

Parameters

path

要匹配的 URL 路径。支持路径参数,例如 "/user/{id}"

getRouting

请求处理逻辑。