Skip to content

Lupa API Reference / network/types / RouteDefinition

Interface: RouteDefinition

Defined in: src/network/types.ts:139

Internal representation of an active mock route within the RouteStore.

Properties

headers?

optional headers?: Record<string, string>

Defined in: src/network/types.ts:158

Normalized headers required for a successful match.


id

id: number

Defined in: src/network/types.ts:143

Unique identifier of the registered mock.


lifetime?

optional lifetime?: number

Defined in: src/network/types.ts:163

Maximum number of times this mock should be applied.


methods?

optional methods?: string[]

Defined in: src/network/types.ts:153

Normalized HTTP methods to match.


pattern?

optional pattern?: URLPattern

Defined in: src/network/types.ts:148

Compiled URLPattern for matching request URLs.


usageCount

usageCount: number

Defined in: src/network/types.ts:168

Number of times this mock has been successfully matched.