0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-29 09:43:20 +01:00
Commit Graph

3 Commits

Author SHA1 Message Date
Sor4chi
4dfcda8282
feat(streaming): implement stream.onAbort (#1871)
* feat: extend `StreamAPI` for response interception and adapt stream handler for it

* chore: denoify
2024-01-02 23:18:04 +09:00
Yusuke Wada
2c47bf5890
fix(context): fix c.stream() and c.streamText() matters (#1482)
* fix(context): fix `c.stream()` and `c.streamText()`

* denoify

* remove the not used line
2023-09-20 22:53:30 +09:00
Sor4chi
31f0605209 feat: Add c.stream() (#1437)
* feat: implement stream api utility-class

* test: write the test of StreamApi

* feat: implement `c.stream` to context

* test: write the test of `c.stream()`

* chore: denoify

* fix: extend for bytes, remove buffer system, add pipe and log interface

* test: update test about log, pipe, etc... for streaming API

* feat: extend textStream interface, remove utf-8 content-type

* test: add test about `c.textStream`

* refactor: update some args name

* chore: denoify

* fix: for deno, removed the optional parameter of `write` and `writeln`

* chore: denoify

* feat: add charset for textStream content-type header

* fix: rename textStream to streamText

* fix: reuse stream in streamText for bundle size

* feat: add `stream.wait()` api

* chore: denoify

* fix: rename `stream.wait` to `stream.sleep`

* test: use `stream.sleep` for waiting

* refactor: remove `stream.log`

* fix: remove preHeader from `c.stream()` and use `transfer-encoding` only `c.streamText()`

* chore: denoify

* refactoring: remove preHeader initialize

* test: reduce sleep duration

* chore: denoify

Co-authored-by: Glen Maddern <glenmaddern@gmail.com>
2023-09-17 00:57:26 +09:00