interface InjectResponse
Since 0.1.0

Inject response shape returned by IKernelApplication.inject.

Properties

readonly
statusCode: number

Response status code.

readonly
headers: Headers

Response headers.

readonly
body: string | null

Raw response body as text. A byte body (from response.send(bytes)) is UTF-8 decoded; null only when the response genuinely has no body.

Methods

json<T>(): T

Parses the response body as JSON.

Usage

import { type InjectResponse } from "kernel/src/index.ts";