Interceptor - cannot add headers

337
1
11-29-2023 07:37 AM
Nikola1
New Contributor

Hi

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
Erick_1
Esri Contributor

Hello,

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 https://community.esri.com/t5/kotlin-maps-sdk-questions/there-is-no-way-to-modify-network-request/m-...

0 Kudos