grpcui icon indicating copy to clipboard operation
grpcui copied to clipboard

Additional headers -H works with grpcurl but not grpcui

Open zchenyu opened this issue 2 years ago • 3 comments

Is there some difference between how headers are passed in grpcui compared to grpcurl?

Using grpcurl:

% grpcurl -plaintext -H "my-token:$MY_TOKEN" <ip>:30080 list
gateway.Gateway
grpc.reflection.v1alpha.ServerReflection

Using grpcui:

% grpcui -plaintext -H "my-token:$MY_TOKEN" <ip>:30080     
Failed to compute set of methods to expose: rpc error: code = Unauthenticated desc = No auth token present

zchenyu avatar Nov 28 '22 18:11 zchenyu

Also pass the headers for --reflect-headers

jamesr66a avatar Nov 29 '22 00:11 jamesr66a

That did the trick! Thank you kind stranger!

Not sure why it's needed though. The docs for -H say: "These headers will also be included in reflection requests to a server." /shrug Will leave this issue open for clarification.

zchenyu avatar Nov 29 '22 00:11 zchenyu

This gotcha'd me also, the docs indicate that -H will include headers in reflection requests but this is not the case.

alandoherty avatar Feb 20 '23 14:02 alandoherty