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

Vinicius Carvalho

09/10/2019, 5:39 PM
Sorry for the abuse today folks, but is it possible to add request headers to a ApplicationRequest object? Here's my problem, I'm using an interceptor to add headers to the call, however the target method that receives the payload is outside of my control:
Copy code
override fun put(carrier: ApplicationRequest?, key: String?, value: String?) {

        }
So I can't really copy the headers to a new instance of headers for example
Oh forgot to mention this is on an HttpClientFeature
Copy code
override fun install(feature: OpenCensusClient, scope: HttpClient) {
            scope.feature(HttpSend)!!.intercept{ origin ->
                
            }
        }
2 Views