fullstorydev / grpcui

An interactive web UI for gRPC, along the lines of postman
MIT License
5.22k stars 388 forks source link

Additional headers -H works with grpcurl but not grpcui #207

Open zchenyu opened 1 year ago

zchenyu commented 1 year ago

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
jamesr66a commented 1 year ago

Also pass the headers for --reflect-headers

zchenyu commented 1 year ago

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.

alandoherty commented 1 year ago

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