I can't test post requests in a project I created ...
# ktor
c
I can't test post requests in a project I created using the Ktor project generator. I copy and pasted the sample from ktor docs: https://ktor.io/docs/testing.html#configure-client I can't quite figure out what the error is trying to tell me, I tried HttpClientConfig@this.install, but that didn't help.
a
Just because it happens to me all the time: is the ContentNegotiarion there imported from the client module (I always mix it with the server one)?
c
not even tried it yet, but I have a feeling you've completely smashed this out of the park
frustratingly though, I don't seem to be able to find any other content negotiation plugins in a client subpackage
imported the io.ktor:ktor-client-content-negotiation and it's there, blimey, I was losing my mind over this, thank you Alejandro
insult to injury, the docs clearly say to add the dependency, feel like a right chump. I wonder if
ServerContentNegotiation
and
ClientContentNegotiation
might be better names for the plugins.
a
@czuckie glad it worked! I agree with you 100%, client and server plugins become hard to separate