is it just for me or does the example here not wor...
# ktor
r
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
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
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
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
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
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