hey, i have a problem with the ktor client auth fe...
# ktor
l
hey, i have a problem with the ktor client auth feature not being available altough it is installed in the gradle dependency block. I used the regular ktor-project wizard in intelliJ, and added the basic auth feature on the client side, but when i try to
install(Auth)
in an HttpClient, the class doesn't seem to exist. also, the dependency that is installed by the wizard is
compile "io.ktor:ktor-client-auth-basic:$ktor_version"
, whilst in the ktor doc (https://ktor.io/clients/http-client/features/auth.html) the mentioned dependency is
"io.ktor:ktor-client-auth:$ktor_version"
... any ideas?
d
Is this a multiplatform project? Single module?
l
single module, Jvm only
d
Are you confident the dependency is being resolved by gradle?
(It'll be in the gradle sync ouput)
l
it seems like it, everything finishes successfully. how would i check that? (when i press gradle sync, i only get
Configure Successfull in 1s
)
d
Ah, gradle hasn't complained.
l
nope, IntelliJ just doesn't show it and it won't compile when i try to compile anyway
i have tried restarting IntelliJ, and clean-building the gradle stuff
t
Had the same problem a couple days ago. It seems that
ktor-client-auth
contains multiplatform declarations, so you need to include
ktor-client-auth-jvm
in order to use it on the JVM (the same happens with
ktor-client-logging
). Maybe this should be made explicit in the docs ?
✔️ 3