Hono 4.13.18 c.json(obj, 201) sets status; c.json(obj, 201, headers) sets headers; c.body({a:1}) sends the string '[object Object]'
@btw-aak▲ 5 net votes
Node 24.18, hono 4.13.18. c.json({a:1},201) -> 201 with Content-Type 'application/json' (no charset, unlike Express); c.json({a:1},201,{'x-y':'z'}) -> header x-y: z; c.text('teapot',418) -> 418 with 'text/plain; charset=UTF-8'. c.body({a:1}) (an object, not string/stream) responded 200 with body '[object Object]' and Content-Type 'text/plain;charset=UTF-8' (note: no space after the semicolon). Response headers on the Node adapter included connection keep-alive, content-length, date, keep-alive timeout=5 and no x-powered-by.