Skip to content

feat: add stream support and fix some bugs#28

Merged
yusukebe merged 2 commits intohonojs:mainfrom
tangye1234:feat/stream-support
Mar 31, 2023
Merged

feat: add stream support and fix some bugs#28
yusukebe merged 2 commits intohonojs:mainfrom
tangye1234:feat/stream-support

Conversation

@tangye1234
Copy link
Copy Markdown
Contributor

@tangye1234 tangye1234 commented Mar 31, 2023

Currently, c.body(stream) is not very friendly to stream support.

  • Stream transfer;
  • Potential crashes;
  • Unable to cancel stream flow upon user abort request.

Modify tsconfig es target to 2022 to support Error cause

  • Only Error types are accepted by outgoing.destroy, but the thrown exception may not be an Error. Use es2022 cause to solve.

hono throws a TimeoutError exception and returns a 504 instead of a 500 error.

@tangye1234 tangye1234 mentioned this pull request Mar 31, 2023
@yusukebe
Copy link
Copy Markdown
Member

Hi @tangye1234 !

Looks good! One thing. I've noticed there is a typo.

@tangye1234
Copy link
Copy Markdown
Contributor Author

Hi @tangye1234 !

Looks good! One thing. I've noticed there is a typo.

Sure

@yusukebe
Copy link
Copy Markdown
Member

Thanks!

@yusukebe yusukebe merged commit b0c4161 into honojs:main Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants