Skip to content

BREAKING(http/unstable): remove HEADER and METHOD - #7239

Open
tomas-zijdemans wants to merge 12 commits into
denoland:mainfrom
tomas-zijdemans:remove-headers-and-methods
Open

BREAKING(http/unstable): remove HEADER and METHOD#7239
tomas-zijdemans wants to merge 12 commits into
denoland:mainfrom
tomas-zijdemans:remove-headers-and-methods

Conversation

@tomas-zijdemans

@tomas-zijdemans tomas-zijdemans commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

This removes the unstable HEADER and METHOD constants from @std/http. They should never have landed: they do no work, they have already drifted from the registries they mirror, and they turn a string literal into a dependency.

They do no work. HEADER.ETag is the string "ETag". Every API these feed into (Headers, Request, fetch) takes plain strings, and editor autocomplete already catches typos. Hono, Express, and the rest don't ship a header-name catalog, because there is nothing to ship.

They rot by design. The constants mirror the IANA HTTP Field Name and Method registries, so they go stale whenever those registries move. Both have drifted since the constants landed in August 2024. Stabilizing them would commit std to tracking two registries forever, for a list of strings.

They are a dependency for nothing. Importing a module to spell "Content-Type" is a dependency std should help users avoid, not create. Two modules, roughly 1,500 lines, and a single consumer in std (file_server.ts), where the plain strings read fine (see the diff).

Both modules have sat unstable for two years with no path to stabilization. Removing them now is cheap. Removing them after stabilization wouldn't be.

Earlier discussion: Discord thread

@github-actions github-actions Bot added the http label Jul 15, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.01%. Comparing base (ca58f94) to head (12b1400).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7239      +/-   ##
==========================================
- Coverage   95.03%   95.01%   -0.03%     
==========================================
  Files         617      615       -2     
  Lines       51637    51424     -213     
  Branches     9359     9359              
==========================================
- Hits        49075    48862     -213     
  Misses       2021     2021              
  Partials      541      541              

☔ 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.

@tomas-zijdemans tomas-zijdemans changed the title refactor(http): remove unstable header and method modules BREAKING(http/unstable): remove HEADER and METHOD Jul 31, 2026
@CLAassistant

CLAassistant commented Aug 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants