truss icon indicating copy to clipboard operation
truss copied to clipboard

unable to get http headers in handler

Open icwr opened this issue 5 years ago • 0 comments

Hi, when I send metadata using grpc I am able to get the k/v pairs in my handler. However, when I do the same using http I get nothing. I see the headers getting added to the context as they're provided in the request and in lower-case.

I am using the following code, which always returns false when using http:

md, ok := metadata.FromIncomingContext(ctx); ok

What is the proper way I should be doing this?

icwr avatar Mar 24 '20 00:03 icwr