https://kotlinlang.org logo
#ktor
Title
# ktor
e

elect

03/04/2024, 9:44 AM
I see
HttpStatusCode
isn't properly resolved, although I added
Copy code
runtimeOnly("io.ktor:ktor-http:$ktorVersion")
is it normal? Shall I add something else?
it gets interesting, because if I try to
assemble
it looks working
e: file///home/elect/IdeaProjects/ktor sample/src/main/kotlin/com/example/Application.kt112:57 No value passed for parameter 'value'
e: file///home/elect/IdeaProjects/ktor sample/src/main/kotlin/com/example/Application.kt112:57 No value passed for parameter 'description'
it complains some missing arguments because I still don't know what to write exactly without the IDE support
s

Sam

03/04/2024, 9:45 AM
If you add a dependency as
runtimeOnly
, it won't be available at compile time. Did you mean to add it as an
implementation
dependency instead?
e

elect

03/04/2024, 9:46 AM
that's what I found online
I tried
implementation
, unfortunately without success
but am I right? is
io.ktor.http.HttpStatusCode
in
io.ktor:ktor-http
?
s

Sam

03/04/2024, 9:48 AM
Yes, at least as far as I can see 👍
😞 1
e

elect

03/04/2024, 9:48 AM
I'll work my way through with the source code 😛
2 Views