You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the SDK does not provide a mechanism to add custom HTTP headers to PUT API requests. Users require this to do custom authentication or rate limiting.
Implement a way to configure both the SDK and the gradle plugin to accept custom headers.
The text was updated successfully, but these errors were encountered:
The Measure gradle plugin makes requests at build time for uploading mapping files. To configure headers for the gradle plugin, use the measure extension in your build.gradle file.
measure {
httpHeaders =mapOf(
"key" to "value"
)
}
There will be an option to set different headers for a particular variant using the variant filter API.
measure {
variantFilter {
httpHeaders =when {
name.contains("debug") ->mapOf("key" to "debug-value")
name.contains("alpha") ->mapOf("key" to "alpha-value")
else->mapOf("key" to "prod-value")
}
}
}
For HTTP requests made by the SDK at runtime, headers can be configured during SDK initialization.
This works for majority of the use cases, though is there a way to update the MeasureConfig post init? We might not have the auth token on the App Start for a non logged in user. So ideally, would like to have an update config method which accepts an updated config object?
We can expose an API for taking in a provider instead of a static map during initialization. This provider will get called just before every request. Any valid headers returned will be added to the request. Here's what it might look like:
Description
Currently, the SDK does not provide a mechanism to add custom HTTP headers to PUT API requests. Users require this to do custom authentication or rate limiting.
Implement a way to configure both the SDK and the gradle plugin to accept custom headers.
The text was updated successfully, but these errors were encountered: