Interceptor - cannot add headers

11-29-2023 07:37 AM
New Contributor


I am using ArcGIS Runime for Kotlin 200.2. I need a request interceptor  to add a new header to the request and change request url so that I can use proxy. But request.headers is not a mutable list, so I cannot add new header there. Is there any workaround for this? Will it be fixed in 200.3?

0 Kudos
1 Reply
Esri Contributor


With 200.2.0 we added support for network interceptors, but at this point only for "observational" purposes such as logging network requests. We are currently working on support for modifying network requests as part of network interception. This will be supported in one of the upcoming releases.

Note, if you are interested in adding headers on every outgoing network request, you can currently do this with ArcGISHttpClient.addAdditionalRequestHeader.

See similar discussion here

0 Kudos