Skip to content

PolicyImmediateResponse

Defined in: src/core/protocol.ts:186

Short-circuit with a complete non-error response.

Used for cache hits, mock responses, redirects - cases where the policy provides the full response and upstream should not be called.

Equivalent to returning a Response without calling next() in HTTP middleware, or ext_proc ImmediateResponse with a success status.

action: "immediate-response"

Defined in: src/core/protocol.ts:187


optional body: string | ArrayBuffer

Defined in: src/core/protocol.ts:193

Response body.


optional headers: Record<string, string>

Defined in: src/core/protocol.ts:191

Response headers.


status: number

Defined in: src/core/protocol.ts:189

HTTP status code for the response.