-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
how to get customezing header #1244
Comments
Hi @jackwener, thanks for your issue. If you want to map a custom header, you can either prefix it with
md, ok := metadata.FromIncomingContext(ctx)
// md["grpcgateway-id"] == "123456" Or add an IncomingHeaderMatcher. We have a section on how to do that in the documentation: https://grpc-ecosystem.github.io/grpc-gateway/docs/customizingyourgateway.html. |
thanks, I'm sorry I didn't read the document carefully。 |
The first part is in the README: https://github.com/grpc-ecosystem/grpc-gateway#features |
phenomenon
send HTTP request with customezing header
(add by postman)
"id": "123456"
I achieve this function by the following code:
but output don't include customezing header kv
The text was updated successfully, but these errors were encountered: