Closed subdigital closed 4 years ago
No, it was not designed to support that scenario. Instead of allowing subdomain
to be overridden here do you want the whole API URL to be configurable, or the entire hostname?
@subdigital The current implementation in the other SDKs allows you to simply supply a network id (at which point we use the base URL) but we also allow a full replacement of the host as well as the full path: https://github.com/adzerk/adzerk-decision-sdk-js/blob/master/src/client.ts#L294
@CrshOverride ok the host is now overridable, defaults to the e-networkID subdomain.
You can specify a subdomain prior to making a request, like this:
If no subdomain is configured, a default one will be used using the
AdzerkSDK.defaultNetworkId
value (i.e.e-23
).If neither of these are set a fatalError occurs with a descriptive message.
This subdomain is used for the API as well as the UDB endpoints.
Fixes #15