Build a fetch-compatible Response covering the surface
HttpClient.request relies on: .status, .ok, .text() (through
parseBody), and — through readHeaders — .headers.entries() and
.headers.getSetCookie(). Nothing in the client reads
.headers.get(). A null-body status (204, 205, 304) gets the null
body the Response constructor insists on.
Parameters
body: unknown
Response body; objects are JSON-serialised (and default
the content-type to JSON), strings pass through.
Build a fetch-compatible
Responsecovering the surfaceHttpClient.requestrelies on:.status,.ok,.text()(throughparseBody), and — throughreadHeaders—.headers.entries()and.headers.getSetCookie(). Nothing in the client reads.headers.get(). A null-body status (204, 205, 304) gets thenullbody theResponseconstructor insists on.