Skip to content

Lupa API Reference / network/types / RequestMatchOptions

Interface: RequestMatchOptions ​

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

Options to strictly match a request by its URI and optionally its HTTP method, search pattern, or query params.

Properties ​

headers? ​

optional headers?: Record<string, string>

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

Required headers to match.


methods? ​

optional methods?: HttpMethod[]

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

HTTP methods to match (e.g. ['GET', 'POST']).


pathname? ​

optional pathname?: string

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

Explicit pathname pattern.


query? ​

optional query?: Record<string, string | string[]>

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

Declarative query parameter key-value pairs to match against parsed URL parameters. Single values act as subset filters allowing extra URL params; arrays require exact set equality.


optional search?: string

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

Explicit search query pattern (e.g., '*' or 'sort=:sort').


uri? ​

optional uri?: string

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

The URI or pathname pattern to match.