[SOLVED] Hello, I'm getting a 404 error when using...
# ktor
a
[SOLVED] Hello, I'm getting a 404 error when using
@Location
on Ktor 1.6.0, anybody had similar issue?
Copy code
dependencies { 
    implementation("io.ktor:ktor-locations:$ktorVersion")
}

tasks.withType<KotlinCompile> {
    kotlinOptions.freeCompilerArgs += listOf("-Xuse-experimental=io.ktor.locations.KtorExperimentalLocationsAPI")
}
Copy code
import io.ktor.locations.Location

@Location("/mylocation")
class MyLocation
Copy code
fun Application.someFun() {
    routing {
        route("/my-root") {
            post<MyLocation> {
ł
I suppose that you have an incorrect import of post method.
a
@Łukasz Bednarczyk This is possible, let me check
@Łukasz Bednarczyk Thanks a lot, you were right, I was importing
import <http://io.ktor.routing.post|io.ktor.routing.post>
instead of
import <http://io.ktor.locations.post|io.ktor.locations.post>
ł
that I thought 😉
😄 1