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: src/connections/sources/catalog/libraries/server/node/index.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -282,9 +282,11 @@ Setting | Details
282
282
`maxRetries` _number_ | The number of times to retry flushing a batch. The default is: `3`
283
283
`maxEventsInBatch` _number_ | The number of messages to enqueue before flushing. The default is: `15`
284
284
`flushInterval` _number_ | The number of milliseconds to wait before flushing the queue automatically. The default is: `10000`
285
-
`httpRequestTimeout` | The maximum number of milliseconds to wait for an http request. The default is: `10000`
286
-
`disable` | Disable the analytics library for testing. The default is: `false`
287
-
`httpClient` *Optional* | A custom AnalyticsHTTPClient implementation to support alternate libraries or proxies. Defaults to global fetch or node-fetch for older versions of node.
285
+
`httpRequestTimeout` _number_ | The maximum number of milliseconds to wait for an http request. The default is: `10000`
286
+
`disable` _boolean_ | Disable the analytics library for testing. The default is: `false`
287
+
`httpClient` _HTTPClient or HTTPClientFn_ | A custom HTTP Client implementation to support alternate libraries or proxies. Defaults to global fetch or node-fetch for older versions of node. See the [Overriding the default HTTP Client](#override-the-default-http-client) section for more details.
288
+
289
+
See the complete `AnalyticsSettings` interface [here](https://github.com/segmentio/analytics-next/blob/master/packages/node/src/app/settings.ts){:target="_blank"}.
288
290
289
291
## Graceful shutdown
290
292
Avoid losing events after shutting down your console. Call `.closeAndFlush()` to stop collecting new events and flush all existing events. If a callback on an event call is included, this also waits for all callbacks to be called, and any of their subsequent promises to be resolved.
@@ -554,7 +556,7 @@ Different parts of your application may require different types of batching, or
554
556
const marketingAnalytics = new Analytics({ writeKey: 'MARKETING_WRITE_KEY' });
555
557
const appAnalytics = new Analytics({ writeKey: 'APP_WRITE_KEY' });
556
558
```
557
-
## AnalyticsHTTPClient
559
+
## Override the default HTTP Client
558
560
559
561
Segment attempts to use the global `fetch` implementation if available in order to support several diverse environments. Some special cases (for example, http proxy) may require a different implementation for http communication. You can provide a customized wrapper in the Analytics configuration to support this. Here are a few approaches:
560
562
@@ -563,21 +565,21 @@ Use a custom fetch-like implementation with proxy (simple, recommended)
0 commit comments