Closed RobertBolender closed 5 months ago
This issue is stale because it has been open 60 days with no activity. Remove stale label / comment or this will be closed in 5 days
This issue is stale because it has been open 60 days with no activity. Remove stale label / comment or this will be closed in 5 days
We would be open to a PR @RobertBolender. We want to keep the existing behavior as well. So maybe a AddHTTPRequestHeadersWithMerged
method?
This issue is stale because it has been open 60 days with no activity. Remove stale label / comment or this will be closed in 5 days
Hello! I'm attempting to add two different custom HTTP headers to a Twirp request in two different locations in my codebase, and I'm realizing that the server only sees the outermost context layer with the custom header, the last call to
WithHTTPRequestHeaders
.Would you be open to a PR that would either update the existing
WithHTTPRequestHeaders
to merge new headers with existing custom headers (if present)? Or if you feel that would be too much of a breaking change, would you be open to a PR that adds a new separateAddHTTPRequestHeaders
method with that behavior?https://github.com/twitchtv/twirp/blob/206451d552e13701fa1111430aa81235029cb329/context.go#L69
I would expect that I would mimic the existing
SetHTTPResponseHeader
andAddHTTPResponseHeader
, I would like that same behavior we have available for the Response on the Request side as well.