Skip to content

RequesterConfig

Defined in: packages/core/src/transport.ts:46

Marketplace-specific seams plus runtime dependencies for createRequester.

O extends BaseRequestOptions

buildHeaders(correlationId): Record<string, string>

Defined in: packages/core/src/transport.ts:60

Build the default header set; receives the generated correlation id.

string

Record<string, string>


buildUrl(opts): string

Defined in: packages/core/src/transport.ts:58

Build the absolute request URL from the SDK’s options.

O

string


optional logFields(opts): Record<string, unknown>

Defined in: packages/core/src/transport.ts:64

Optional extra structured fields merged into request/error log lines (e.g. { service }).

O

Record<string, unknown>


mapHttpError(status, body, retryAfterMs?): LoncaError

Defined in: packages/core/src/transport.ts:62

Map a non-2xx response to a LoncaError.

number

unknown

number

LoncaError

fetch: (input, init?) => Promise<Response>

Defined in: packages/core/src/transport.ts:48

Underlying fetch (tests inject a mock).

string | URL | Request

RequestInit

Promise<Response>


label: string

Defined in: packages/core/src/transport.ts:54

Human-readable marketplace name for error messages, e.g. 'Trendyol'.


optional logger?: Logger

Defined in: packages/core/src/transport.ts:50

Structured logger. Defaults to a no-op.


logPrefix: string

Defined in: packages/core/src/transport.ts:56

Log-event prefix, e.g. 'trendyol'trendyol.request / trendyol.error / trendyol.retry.


timeoutMs: number

Defined in: packages/core/src/transport.ts:52

Per-request timeout in ms.

Unofficial. Lonca is an independent, community-maintained project — not affiliated with, endorsed by, or supported by Trendyol, Hepsiburada, or any other marketplace. All marketplace names and trademarks belong to their respective owners.