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

robstoll

05/31/2019, 2:56 PM
is it just for me or does the example here not work: https://ktor.io/clients/http-client/testing.html
I had to change it to
Copy code
@UseExperimental(InternalAPI::class)
when (request.url.encodedPath) {
}
which seems odd
oh... it seems the problem is due to an IDE error. HttpClient is red in my case and
url
as well. Running the works though, any suggestion?
r

russhwolf

05/31/2019, 3:52 PM
It's a DSL marker color scheme that's a little confusing. https://youtrack.jetbrains.com/issue/KT-28922
😞 1
It's actually not an IDE error, it's just coloring it with a shade of red that looks similar
r

robstoll

05/31/2019, 5:06 PM
Oh man, great default colour choice 😄
actually, HttpClient is due to DSL marker colour but
url
is not
The IDE also shows me
unresolved reference
as error
oh... and running does not work anymore after a clean
r

russhwolf

05/31/2019, 5:12 PM
You do need the
@UseExperimental
to access things on the
request
object. That's a different error
Someone on the ktor team could speak to that better than I, but I guess they wanted to mark that the api there might not be stable
r

robstoll

05/31/2019, 5:13 PM
or in other words, where does
url.fullUrl
come from? Maybe the example is missing an import?
actually only
url
is of interest,
fullUrl
is defined in the example
must be of
request.url
I'll write a pull request
r

russhwolf

05/31/2019, 5:39 PM
That API changed in 1.2 and I think the sample hasn't been updated
hm... so ktor does not follow semantic version then, that's good to know