adzerk / adzerk-ios-sdk

Access Adzerk's ad serving APIs via iOS
https://www.adzerk.com
Other
9 stars 5 forks source link

Support for E-dash domains #17

Closed subdigital closed 4 years ago

subdigital commented 4 years ago

You can specify a subdomain prior to making a request, like this:

AdzerkSDK.subdomain = “mycustomsubdomain”

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

subdigital commented 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?

CrshOverride commented 4 years ago

@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

subdigital commented 4 years ago

@CrshOverride ok the host is now overridable, defaults to the e-networkID subdomain.