Skip to content

feat: unify request/response header and body access - #81

Merged
ardikabs merged 3 commits into
mainfrom
feat/add-new-helper-for-headers
Oct 25, 2026
Merged

ardikabs merged 3 commits into
mainfrom
feat/add-new-helper-for-headers

Conversation

@ardikabs

Copy link
Copy Markdown
Owner

No description provided.

…headers

Remove Header, SetHeader, and SetRequestHeader from Context. Header
manipulation now lives solely in c.Request().Header and
c.Response().Header with standard net/http verbs. Add Response() live
view backed by the recording writer so response reads no longer need
status-gated workarounds. Migrate examples, e2e filters, and docs.
Document stale-view loss across next and read-only non-Header fields.
Guard nil request Header in newHandlerContext, nil writer in Status,
and empty StatusText in Response status line. Cover with fresh-view,
nil-map, status-format, and nil-body tests.
Signed-off-by: Ardika Bagus <me@ardikabs.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 74.46809% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.43%. Comparing base (5f4d902) to head (fe82648).

Files with missing lines Patch % Lines
context_handler.go 79.16% 3 Missing and 2 partials ⚠️
bridge.go 80.00% 3 Missing ⚠️
bridgefilter.go 50.00% 1 Missing and 1 partial ⚠️
context_httpfilter.go 66.66% 0 Missing and 1 partial ⚠️
example/helloworld/main.go 0.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
+ Coverage   66.15%   66.43%   +0.28%     
==========================================
  Files          27       27              
  Lines        1743     1764      +21     
==========================================
+ Hits         1153     1172      +19     
- Misses        491      492       +1     
- Partials       99      100       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ardikabs
ardikabs merged commit dabc4a7 into main Oct 25, 2026
2 checks passed
@ardikabs
ardikabs deleted the feat/add-new-helper-for-headers branch October 25, 2026 12:07
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