Lupa API Reference / network/types / NetworkRespondPayload
Interface: NetworkRespondPayload
Defined in: src/network/types.ts:57
The static payload definition used to fulfill an intercepted request.
Properties
body?
optionalbody?:string|ArrayBuffer|null
Defined in: src/network/types.ts:63
The response body. Can be a string, an ArrayBuffer (for binary data), or null.
delay?
optionaldelay?:number
Defined in: src/network/types.ts:65
Milliseconds to delay the response fulfillment. Useful for simulating latency.
error?
optionalerror?:NetworkError
Defined in: src/network/types.ts:67
Triggers a network-level error matching the specified Playwright error string.
headers?
optionalheaders?:Record<string,string>
Defined in: src/network/types.ts:61
HTTP headers to send back with the response.
status?
optionalstatus?:number
Defined in: src/network/types.ts:59
HTTP status code to return (e.g., 200, 404). Default is 200.