RequestWithOptions

Properties

NameType
callback(response: RequestResponse) => void
compressionCompression | 'best-available'
dataRecord<string, any> | Record<string, any>[]
disableTransport('XHR' | 'fetch' | 'sendBeacon')[]
fetchOptions{ cache?: RequestInit['cache']; next?: NextOptions; }
fireCallbackOnDropboolean

When set, _send_request invokes callback with a synthetic response on the paths that otherwise drop a request without notifying the caller (client not loaded, server rate limit). Opt-in so existing callers keep their current behavior; the logs pipeline uses it to keep records for a later retry instead of losing them silently.

headersRecord<string, any>
method'POST' | 'GET'
noRetriesboolean
timeoutnumber
timestampMode'body' | 'capture-body' | 'query'

Controls where the request dispatch time is sent. - body adds ISO sent_at to the existing request object (for example, flags). - capture-body wraps events in { api_key, batch, sent_at } with an ISO timestamp. - query adds numeric sent_at to POST requests or cache-busting _ to GET requests.

transport'XHR' | 'fetch' | 'sendBeacon'
urlstring
urlQueryArgs{ compression: Compression; }

Community questions