https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
e

Elyes Ben Salah

06/08/2021, 10:53 AM
the use case is to add additional header for each request executed, let’s say Authentication but with a custom header key
p

Perrankana

06/08/2021, 10:55 AM
I think this is what you are looking for https://ktor.io/docs/default-headers.html#add
e

Elyes Ben Salah

06/08/2021, 10:56 AM
I already took a look but , what I need is to intercept the executed request , to get the URL , Body , Method and generate the Header depends on the parameters
m

Mayank

06/08/2021, 7:10 PM
Check out https://ktor.io/docs/default-request.html. The default headers block is called after the request is configured. Refer https://github.com/ktorio/ktor/issues/537#issuecomment-603272476