-
-
Notifications
You must be signed in to change notification settings - Fork 274
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 pass the authorization token as header information #424
Comments
Also having this issue |
We are also running into the same issue. Requests work fine with Our Header format is |
Try |
I have already tried many different ways to do that, and it still doesn't work with Ghz, but it perfectly works with grpcurl. |
also seeing this what works grpcurl works with |
If it helps move things along here is what grpcurl does to tranform headers into metadata |
I dug a little bit and found the issue is ghz only passes the metadata you provide with the requests you define. There is an explicit request it makes on your behalf if you do not provide an explicit proto or protoset to reflect over your service to get the info it needs to structure its requests called ghz does not send the metadata you provide with the |
there is however a work around which is to pass the same data passed with ghz \
--metadata="{\"authorization\": \"Bearer $TOKEN\"}" \
--reflect-metadata="{\"authorization\": \"Bearer $TOKEN\"}" \
... I understand the value in having the flexibility but this is a bit of leaky abstraction for me and a detail callers shouldn't have to think about. I think the default should be to pass metadata in |
Hi,
I have my grpc service behind an API gateway. The gateway protects the service using an API key. I am able to use the above using
grpcurl
as follows:I want to load test the same thing using
ghz
and I am facing issues in calling using the metadataI keep getting the error
The text was updated successfully, but these errors were encountered: