Skip to content

feat: expose HTTP headers on cmds.Request#332

Draft
lidel wants to merge 1 commit into
masterfrom
feat/request-headers
Draft

feat: expose HTTP headers on cmds.Request#332
lidel wants to merge 1 commit into
masterfrom
feat/request-headers

Conversation

@lidel
Copy link
Copy Markdown
Member

@lidel lidel commented May 7, 2026

Quality of live improvement, lets command handlers read request-scoped metadata (correlation ids, trace context, feature flags) without each downstream having to maintain custom HTTP middleware to lift headers into context.Context.

This is step towards EventSource support in Kubo RPC.
WIP, do not merge until we have Kubo PR that uses this.

Adds Request.Headers (http.Header), populated by the HTTP transport
from r.Header.Clone() in parseRequest. Local in-process executor
leaves it nil; handlers that read it can rely on http.Header.Get
being safe on a nil receiver.

Lets command handlers read request-scoped metadata (correlation ids,
trace context, feature flags) without each downstream having to
maintain custom HTTP middleware to lift headers into context.Context.
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.

1 participant