Skip to content

trackkit / dispatcher/types / Transport

Interface: Transport

Defined in: dispatcher/types.ts:15

Low-level transport contract used by the dispatcher.

A transport is responsible for sending a single HTTP request described by a DispatchPayload. Concrete implementations include:

  • FetchTransport
  • BeaconTransport
  • ProxiedTransport
  • a NoopTransport used in playgrounds/tests

Properties

id

id: string

Defined in: dispatcher/types.ts:17

Identifier for diagnostics (e.g. "fetch", "beacon", "proxy").

Methods

send()

send(payload): Promise<void | Response>

Defined in: dispatcher/types.ts:25

Send a single network payload.

Parameters

payload

DispatchPayload

Provider-agnostic HTTP payload (URL, body, init).

Returns

Promise<void | Response>

A Response (or void for beacon-like transports).

Released under the MIT License.