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
* Custom function called before each request, allowing you to add or update headers in SDK HTTP requests.
1142
+
* Some headers, such as `SplitSDKVersion`, are required by the SDK and cannot be overridden.
1143
+
* To pass multiple headers with the same name, combine their values into a single line, separated by commas. Example: `{ 'Authorization': 'value1, value2' }`
1144
+
* Or provide keys with different case since headers are case-insensitive. Example: `{ 'authorization': 'value1', 'Authorization': 'value2' }`
1145
+
*
1146
+
* NOTE: to pass custom headers to the streaming connection in Browser, you should polyfill the `window.EventSource` object with a library that supports headers,
1147
+
* like https://www.npmjs.com/package/eventsource, since the native EventSource object does not support them in general and will be ignored.
1145
1148
*
1146
1149
* @property getHeaderOverrides
1147
1150
* @default undefined
1151
+
*
1152
+
* @param context - The context for the request.
1153
+
* @param context.headers - The current headers in the request.
1154
+
* @returns A set of headers to be merged with the current headers.
* Custom function called before each request, allowing you to add or update headers in SDK HTTP requests.
1218
+
* Some headers, such as `SplitSDKVersion`, are required by the SDK and cannot be overridden.
1219
+
* To pass multiple headers with the same name, combine their values into a single line, separated by commas. Example: `{ 'Authorization': 'value1, value2' }`
1220
+
* Or provide keys with different case since headers are case-insensitive. Example: `{ 'authorization': 'value1', 'Authorization': 'value2' }`
1206
1221
*
1207
1222
* @property getHeaderOverrides
1208
1223
* @default undefined
1224
+
*
1225
+
* @param context - The context for the request.
1226
+
* @param context.headers - The current headers in the request.
1227
+
* @returns A set of headers to be merged with the current headers.
0 commit comments