You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[http]: Add HEAD operation template that returns resource-related headers #12411
We recently worked with some HEAD operation definitions and thought that it would be useful to have a type that allows folks to create a HEAD operation based on a GET operation, which would automatically signal that this service also supports HEAD operations for that endpoint and automatically considers all of the headers for that operation so the true definition lives in one place and it's easier to maintain the supported set of headers in one definition.
Requests an HTTP operation template for declaring HEAD support from a corresponding GET operation while reusing its resource-related response headers as the single source of truth.
Category: Feature Request
Area: lib:http
🔍 Analysis
This affects @typespec/http operation modeling and template design. The key design questions are how the HEAD operation identifies its GET counterpart, which GET response headers are inherited, and how status codes, parameters, and routes are preserved while excluding the response body. #6573 and closed #9809 concern HEAD validation/header handling, but neither requests this reusable GET-derived operation template.
📝 Suggested next steps
Define the template signature and explicit association with the source GET operation.
Specify header inheritance across response variants and status codes.
Add HTTP metadata and emitter tests confirming that HEAD retains headers but no response body.
Activity
github-actions commentedon Oct 27, 2026
🎯 Issue Triage
Requests an HTTP operation template for declaring HEAD support from a corresponding GET operation while reusing its resource-related response headers as the single source of truth.
Category: Feature Request
Area:
lib:http🔍 Analysis
This affects
@typespec/httpoperation modeling and template design. The key design questions are how the HEAD operation identifies its GET counterpart, which GET response headers are inherited, and how status codes, parameters, and routes are preserved while excluding the response body. #6573 and closed #9809 concern HEAD validation/header handling, but neither requests this reusable GET-derived operation template.📝 Suggested next steps