method InjectResponse.json
InjectResponse.json<T>(): T

Parses the response body as JSON.

Type Parameters

Return Type

Throws

Error

If the response has no body

SyntaxError

If the body is not valid JSON

Usage

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