Alexandre Brown
08/23/2021, 12:45 PM@Location
on Ktor 1.6.0, anybody had similar issue?
dependencies {
implementation("io.ktor:ktor-locations:$ktorVersion")
}
tasks.withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf("-Xuse-experimental=io.ktor.locations.KtorExperimentalLocationsAPI")
}
import io.ktor.locations.Location
@Location("/mylocation")
class MyLocation
fun Application.someFun() {
routing {
route("/my-root") {
post<MyLocation> {
Łukasz Bednarczyk
08/23/2021, 12:51 PMAlexandre Brown
08/23/2021, 12:52 PMAlexandre Brown
08/23/2021, 12:58 PMimport <http://io.ktor.routing.post|io.ktor.routing.post>
instead of import <http://io.ktor.locations.post|io.ktor.locations.post>
Łukasz Bednarczyk
08/23/2021, 12:59 PM