-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add ability to echo request headers in trailing metadata #1501
Conversation
This works for gRPC. I haven't figured out how to get the information for REST |
@noahdietz Please could you take another look? Should we also support this for REST? Can that be added in a separate PR? |
Yes, definitely.
Yes, definitely. We may want the generated REST handlers, like this: gapic-showcase/server/genrest/echo.go Lines 87 to 99 in a34fc37
...to pull the same metadata from the context (as the gRPC handlers do) and write them as HTTP headers. I'd probably add a helper here for copying context metadata into HTTP response headers, then invoke that in the spot above (generator code here). @vchudnov-g may be interested in this. |
server/genproto/compliance.pb.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert all of the changes in the server/genproto
directory, the headers will just be replaced when things are regenerated by CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This includes fixes from #1500. Please review #1500 firstDoneFixes #1493
Using this showcase server, I was able to see the http request headers in the trailing metadata
Response