/Knowledge/sources/honojs__hono/llms-full/streaming-helper-stream--19f8677176cf.md
Streaming Helper: stream() - hono-docs
Streaming Helper: stream() Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt stream Summary It returns a...
Streaming Helper: stream()
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#stream
Summary
It returns a simple streaming response as Response object. ```ts app.get('/stream', (c) => { return stream(c, async (stream) => { // Write a process to be executed when aborted. stream.onAbort(() => { console.log('Aborted!') }) // Writ...
Content
It returns a simple streaming response as Response object.
app.get('/stream', (c) => {
return stream(c, async (stream) => {
// Write a process to be executed when aborted.
stream.onAbort(() => {
console.log('Aborted!')
})
// Write a Uint8Array.
await stream.write(new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f]))
// Pipe a readable stream.
await stream.pipe(anotherReadableStream)
})
})
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#stream",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Streaming Helper > `stream()`",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 674,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Streaming Helper: stream()",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}