/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-serve-binary-data-79ca8506e8fe-serve-binary-data-s0424-c0000.md
Serve Binary data - hono-docs
Serve Binary data Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt serve binary data Summary Hono...
Serve Binary data
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#serve-binary-data
Summary
Hono supports binary data as a response. In Lambda, base64 encoding is required to return binary data. Once binary type is set to Content-Type header, Hono automatically encodes data to base64. ```ts app.get('/binary', async (c) => { /...
Content
Hono supports binary data as a response.
In Lambda, base64 encoding is required to return binary data.
Once binary type is set to Content-Type header, Hono automatically encodes data to base64.
app.get('/binary', async (c) => {
// ...
c.status(200)
c.header('Content-Type', 'image/png') // means binary data
return c.body(buffer) // supports `ArrayBufferLike` type, encoded to base64.
})