Skip to content

Add setheader!, appendheader! and removeheader! aliases - #1359

Open
quinnj wants to merge 1 commit into
masterfrom
claude/header-bang-aliases
Open

Add setheader!, appendheader! and removeheader! aliases#1359
quinnj wants to merge 1 commit into
masterfrom
claude/header-bang-aliases

Conversation

@quinnj

@quinnj quinnj commented Sep 10, 2026

Copy link
Copy Markdown
Member

Closes #1277.

Problem

setheader, appendheader and removeheader mutate their first argument but carry no !, so readers expect them to return copies. The thread on #1277 settled on adding the ! spellings without deprecating the historical names, since those also existed in 1.x.

Change

  • setheader!, appendheader! and removeheader! are defined as const aliases of the existing functions, so each pair is the same function object: every existing method (both the Headers and the Request/Response forms) is reachable under either name, and a package extending one name extends the other.
  • The historical names are not deprecated. Their docstrings now point at the ! spelling as the preferred form.
  • All three new names are declared public alongside the old ones and are listed on the core API docs page.
  • CHANGELOG entry added.

Tests

Mutating-name header aliases (#1277) in test/http_core_tests.jl checks identity of the aliases, the Headers and message-level forms (including the comma-merge behavior of appendheader! and case-insensitive removeheader!), and that the names are public on Julia 1.11+.

test/http_core_tests.jl passes in full locally on Julia 1.12.6.

🤖 Generated with Claude Code

`setheader`, `appendheader` and `removeheader` all mutate their first
argument but lack the conventional `!` suffix, which misleads readers
into expecting copies (#1277). Add the `!` spellings as the same
function objects (so extending either name extends both), keep the
historical names undeprecated, mark all six `public`, and cross-link
the docstrings.

Closes #1277

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.51%. Comparing base (d6f049a) to head (d2a4f1c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1359      +/-   ##
==========================================
+ Coverage   89.42%   89.51%   +0.08%     
==========================================
  Files          31       31              
  Lines       12594    12594              
==========================================
+ Hits        11262    11273      +11     
+ Misses       1332     1321      -11     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Missing ! in header-mutating functions

1 participant