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: packages/browser/src/plugins/segmentio/shared-dispatcher.ts
+20-19Lines changed: 20 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -18,37 +18,38 @@ export type AdditionalHeaders =
18
18
|Record<string,string>
19
19
|(()=>Record<string,string>)
20
20
21
-
/**
22
-
* Priority of the request.
23
-
* chrome only
24
-
* @default 'auto'
25
-
*/
26
21
exporttypeFetchPriority='high'|'low'|'auto'
27
22
28
-
exporttypeBatchingDispatchConfig={
29
-
size?: number
30
-
timeout?: number
31
-
maxRetries?: number
32
-
additionalHeaders?: AdditionalHeaders
33
-
/**
34
-
* This is useful for ensuring that events are sent even if the user navigates away from the page.
35
-
* @default false IF the page is being unloaded, true otherwise
36
-
*/
37
-
keepalive?: boolean
38
-
fetchPriority?: FetchPriority
39
-
}
40
-
41
-
exporttypeStandardDispatcherConfig={
23
+
interfaceDispatchConfig{
42
24
/**
43
25
* This is useful for ensuring that an event is sent even if the user navigates away from the page.
44
26
* However, it may increase the likelihood of events being lost, as there is a 64kb limit for all fetch requests with keepalive (which is why it's disabled by default).
45
27
* @default false
46
28
*/
47
29
keepalive?: boolean
30
+
/**
31
+
* Additional headers to be sent with the request.
32
+
* Default is `Content-Type: text/plain`. This can be overridden.
33
+
* If a function is provided, it will be called before each request.
0 commit comments