@synode/adapter-http
v5.0.25
Published
HTTP adapter for Synode
Maintainers
Readme
@synode/adapter-http
HTTP output adapter for Synode. Sends generated events to a remote endpoint with automatic batching and retry.
Install
npm install @synode/adapter-httpRequires @synode/core as a peer dependency.
Usage
import { generate } from '@synode/core';
import { HttpAdapter } from '@synode/adapter-http';
const adapter = new HttpAdapter({
url: 'https://api.example.com/events',
batchSize: 50,
headers: { Authorization: 'Bearer token' },
});
await generate(journey, { users: 100, adapter });
await adapter.close();Options
| Option | Type | Default | Description |
| --------------- | ------------------------------ | -------- | -------------------------------------------- |
| url | string | -- | Target endpoint URL |
| method | 'POST' \| 'PUT' | 'POST' | HTTP method |
| headers | Record<string, string> | {} | Additional request headers |
| batchSize | number | 1 | Events to buffer before sending |
| flushInterval | number | 5000 | Interval (ms) to flush partial batches |
| maxRetries | number | 3 | Retry attempts for 5xx/429 responses |
| transform | (events: Event[]) => unknown | -- | Transform batch payload before serialization |
Events are sent as { events: [...] } by default. Use transform to reshape the payload for your endpoint.
Documentation
License
Proprietary -- see LICENSE for details.
Copyright © 2026 Digitl Cloud GmbH
