body: string
code: number
dom: LegacyDomNode
$res->dom (Mojo::Message::Body's own DOM-parsing shortcut) — parses body as HTML
on first access. A getter (not parsed eagerly at fetch time) since most call sites only ever
read .body as plain text and never touch .dom at all.
json: unknown
$res->json (Mojo::Message::Body's own JSON-decoding shortcut) — parses body as JSON on
first access. Real Mojo::Message::Body::json returns undef on a parse failure rather than
throwing (legacy code routinely checks if (defined $res->json) or wraps the whole call in
eval {} expecting exactly that); matched here by returning undefined instead of letting
JSON.parse throw.
is_error: boolean
$res->is_error (Mojo::Message's own status-class check) — true for any 4xx/5xx HTTP
status.
headers: { location: string | undefined; }
$res->headers — not a general Mojo::Headers shim, just the one accessor
(->location, read when manually following a 301/302 redirect with max_redirects(0)) any
real call site in the legacy plugin corpus actually reads off a response's headers.