Hy everyone, we’re having a problem with ktor 2.0....
# ktor
m
Hy everyone, we’re having a problem with ktor 2.0.3 with the Darwin engine. We’re trying to send a custom header but it seems that the block inside
configureRequest
is never called. Is there another way to modify the request before it’s sent?
m
How about using defaultRequest ?
a
This is a bug. To send a custom header you can modify a
HttpRequestBuilder
:
Copy code
val response = client.get("<https://httpbin.org/get>") {
    header("X-Custom-Header", "my header value")
}
m
Thank you for the bug. We’re gonna use the default request as a workaround for now