Optional ReadonlybodyA chunked body, when the transport can yield one (§76 streaming).
Structural: the DOM's ReadableStream satisfies ReadableBodyLike
(getReader() → { read(), releaseLock? }). Absent on a one-shot fake,
in which case AssetManager.stream yields the whole
FetchResponse.arrayBuffer once.
Optional ReadonlycontentDeclared body size in bytes when the transport has no header map.
Optional: a real Response already exposes this via
headers.get("content-length"), which the manager reads first. A test
fake — or a non-HTTP transport — may set the field instead. Either
source is the same number: an early bound, never the whole §96 check.
Optional ReadonlyheadersThe response headers, if the transport has any (§96).
Optional because a non-HTTP transport — or a unit test's fake — has none,
and because it was added after the interface shipped; the DOM's Headers
satisfies it structurally, so a real Response still needs no adapter.
The manager reads exactly one header from it, content-length, to refuse
an over-budget body before downloading it.
ReadonlyokWhether the status is in the 2xx range.
ReadonlystatusThe HTTP status code; 0 is acceptable for non-HTTP transports.
The subset of a
fetchresponse this package reads.Structural on purpose, exactly as
@fourjs/inputdeclares its pointer events: the DOM/undiciResponsesatisfies it, and so does{ ok: true, status: 200, … }in a test. NamingResponsewould drag a DOM lib into a package that must build under plainlib.es2022.