Skip to content

Lupa API Reference / network/types / RouteDefinition

Interface: RouteDefinition

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

Internal representation of an active mock route within the RouteStore.

Properties

headers?

optional headers?: Record<string, string>

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

Normalized headers required for a successful match.


id

id: number

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

Unique identifier of the registered mock.


lifetime?

optional lifetime?: number

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

Maximum number of times this mock should be applied.


methods?

optional methods?: string[]

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

Normalized HTTP methods to match.


pattern?

optional pattern?: URLPattern

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

Compiled URLPattern for matching request URLs.


usageCount

usageCount: number

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

Number of times this mock has been successfully matched.