What's the best way to fully dump a ktor request? ...
# ktor
r
What's the best way to fully dump a ktor request? I'm getting a 406 from the server, but I can't figure out why, neither can reproduce it with httpie.
Code:
Copy code
val creation = client.request(url.build()) {
        basicAuth("admin", rabbitmqPassword)
        method = m
        contentType(ContentType.Application.Json)
        setBody(body)
    }
Making the same request with httpie works just fine.
Copy code
val client = HttpClient(CIO) {
    install(ContentNegotiation) {
        json()
    }
}
This looks a bit fishy:
Copy code
TRACE i.k.c.p.c.ContentNegotiation - Adding Accept=application header for
Ah nah, just a bit unfortunate logging
🤨
Copy code
TRACE i.k.c.p.compression.ContentEncoding - Adding Accept-Encoding=io.ktor.client.request.HttpRequestBuilder@36254a64 for
Ah 🤦 406 vs. 400
a
I would make requests with either client while observing HTTP traffic in Wireshark to determine the difference.
r
Burp with https mitm proxy would probably work even better