Commit eb49a16
docs(http): remove unimplemented deserializeStream handler property (#641)
* docs(http): remove unimplemented deserializeStream handler property
The content-type handler interface table documented a
`deserializeStream(stream)` property that Harper does not implement. The
`ContentTypeHandler` interface in the core repo declares only `serialize`,
`serializeStream`, `deserialize`, and `q`.
Removes the `deserializeStream` row and drops the now-dangling "Used when
`deserializeStream` is absent." clause from the `deserialize(buffer)`
description.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs(http): clarify serializeStream return type and granularity
The Handler Interface table typed `serializeStream` as returning a WHATWG
`ReadableStream`. Verified against harper origin/main: every built-in handler
returns a Node.js `Readable` (`streamAsJSON` -> `JSONStream extends Readable`,
`Readable.from(...)`, `EncoderStream`, `toCsvStream`), and the call site in
`server/serverHelpers/contentTypes.ts` pipes the return value through
`createBrotliCompress()` and hands it to the HTTP layer as the response body.
Also record the granularity: `serializeStream` is invoked once per response
with the entire iterable, and only when the response body is an iterable or
async iterable. Per-chunk serialization is `serialize`, which the streaming
handlers call for each message.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 0841ba6 commit eb49a16
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
444 | 443 | | |
445 | 444 | | |
446 | 445 | | |
| |||
0 commit comments