Open tommus opened 3 years ago
Hi,
We don't support custom headers to the registration/subscription requests. we will discuss this in our future road map planning
You may also consider switching to OkHttp to handle REST calls. This is basically a standard (solely or via Retrofit) for the most of Android applications. OkHttp will take care for all the networking things (including headers) and open a lot of possibilities whenever client has to do something non-usual.
I'm using Kandy SDK in order to establish and handle audio connections.
A third party backend service which I need to connect to uses a different authentication header (
x-token
) instead ofAuthorization
header.Can you please provide a way to inject custom headers so the library will use these while performing REST requests?
I saw
RestUtils
class and reviewed the source code. It should be quite simple to achieve (eg. by adding a static map of custom headers inConfiguration
class. Those headers might be added tomessageHeader
before theRestUtils
's methodgetDefaultHeaders
return.I'm maintaining quite big project for a longer while (two years so far) starting from the original Genband library. Right now, having no possibility to inject SPiDR token via
x-token
header while performing registration is a blocking issue, forcing me to start considering to drop the Genband / Kandy library entirely.Any help will be much appreciated. Thank you.