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
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -120,13 +120,15 @@ The Unleash SDK takes the following options:
120
120
| url | yes | n/a | The Unleash Proxy URL to connect to. E.g.: `https://examples.com/proxy`|
121
121
| clientKey | yes | n/a | The Unleash Proxy Secret to be used |
122
122
| appName | yes | n/a | The name of the application using this SDK. Will be used as part of the metrics sent to Unleash Proxy. Will also be part of the Unleash Context. |
123
+
| context | no |`{}`| The initial Unleash context. This will be used as the initial context for all feature toggle evaluations. The `appName` and `environment` options will automatically be populated with the values you pass for those options. |
123
124
| refreshInterval | no |`30`| How often, in seconds, the SDK should check for updated toggle configuration. If set to 0 will disable checking for updates |
124
125
| disableRefresh | no |`false`| If set to true, the client will not check for updated toggle configuration |
125
126
| metricsInterval | no |`60`| How often, in seconds, the SDK should send usage metrics back to Unleash Proxy. It will be started after the initial metrics report, which is sent after the configured `metricsIntervalInitial`|
126
127
| metricsIntervalInitial | no |`2`| How long the SDK should wait for the first metrics report back to the Unleash API. If you want to disable the initial metrics call you can set it to 0. |
127
128
| disableMetrics | no |`false`| Set this option to `true` if you want to disable usage metrics |
128
129
| storageProvider | no |`LocalStorageProvider` in browser, `InMemoryStorageProvider` otherwise | Allows you to inject a custom storeProvider |
129
-
| fetch | no |`window.fetch` or global `fetch`| Allows you to override the fetch implementation to use. Useful in Node.js environments where you can inject `node-fetch`|
130
+
| fetch | no |`window.fetch` or global `fetch`| Allows you to override the fetch implementation to use. Useful in Node.js environments where you can inject `node-fetch`|
131
+
| createAbortController | no |`() => new AbortController()`| Allows you to override the default `AbortController` creation. Used to cancel requests with outdated context. Set it to `() => null` if you don't want to handle it. |
130
132
| bootstrap | no |`[]`| Allows you to bootstrap the cached feature toggle configuration. |
131
133
| bootstrapOverride | no|`true`| Should the bootstrap automatically override cached data in the local-storage. Will only be used if bootstrap is not an empty array. |
132
134
| headerName | no|`Authorization`| Which header the SDK should use to authorize with Unleash / Unleash Proxy. The header will be given the `clientKey` as its value. |
0 commit comments