feat: Add ability to echo request headers in trailing metadata#1501
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. |
There was a problem hiding this comment.
Please revert all of the changes in the server/genproto directory, the headers will just be replaced when things are regenerated by CI.
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