RevealBi / Reveal.Sdk

Issue tracker - Reveal SDK https://www.revealbi.io/
https://www.revealbi.io/
3 stars 0 forks source link

Make RevealSdkSettings.setBaseUrl to accept asynchronous provider instead of just simple string #221

Open pchlupacek opened 2 weeks ago

pchlupacek commented 2 weeks ago

Is your feature request related to a problem? Please describe. Currently the RevealSdkSettings.setBaseUrl accepts the string as the url where reveal backend is running. In some client environments the URL may have dynamic nature (i.e. pointing to specific geo data center based on the data center status).

In such scenarios provider with asynchronous signature (i.e. provider: Promise)will be super helpful b/c it will allow to query current url for any reveal SDK request, before that request will be send to reveal backend.

Describe the solution you'd like A clear and concise description of what you want to happen.

add RevealSdkSettings.setBaseUrlProvider(provider: Promise) to RevealSdkSettings.

Describe alternatives you've considered Currently we run a timer/custom logic to detect the change in URL and always call RevealSdkSettings.setBaseUrl when needed.

Additional context