Skip to content

docs: update example to use event.res.headers.set#1289

Merged
pi0 merged 1 commit intoh3js:mainfrom
imslepov:docs/stream-example
Feb 5, 2026
Merged

docs: update example to use event.res.headers.set#1289
pi0 merged 1 commit intoh3js:mainfrom
imslepov:docs/stream-example

Conversation

@imslepov
Copy link
Contributor

@imslepov imslepov commented Jan 26, 2026

--

Summary by CodeRabbit

  • Documentation
    • Updated streaming response code examples to reflect the current API for setting HTTP headers in responses.

✏️ Tip: You can customize this high-level summary in your review settings.

@imslepov imslepov requested a review from pi0 as a code owner January 26, 2026 08:51
@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

Documentation update refactoring header manipulation patterns. Replaces setResponseHeader helper function with direct event.res.headers.set() API calls in stream response examples. Import statements adjusted to remove the deprecated helper reference.

Changes

Cohort / File(s) Change Summary
Documentation Updates
docs/4.examples/stream-response.md
Updated code examples to use event.res.headers.set() for header manipulation instead of setResponseHeader helper; removed helper from import statement

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Headers flow like carrot juice,
Direct mutation—what's the use?
No helpers needed, clean and bright,
The API shines, the docs are right! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: updating documentation examples to use the event.res.headers.set API instead of setResponseHeader.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 26, 2026

Open in StackBlitz

npm i https://pkg.pr.new/h3js/h3@1289

commit: b38bb3b

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ❤️

@pi0 pi0 merged commit ddd2827 into h3js:main Feb 5, 2026
6 checks passed
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