grpcui icon indicating copy to clipboard operation
grpcui copied to clipboard

How do I use Proto on a GRPC server that does not provide reflection

Open testQx opened this issue 4 years ago • 2 comments

I tried to import the relevant proto dependencies using -proto and -import-path, but the default prompt said "This program requires exactly one ARG: the host:port of GRPC server." How do I skip the GRPC server link and go directly to Proto to generate relevant APIs I wish I had a demo of it

testQx avatar Jun 27 '21 06:06 testQx

@testQx, even when you provide proto sources, you still have to provide the host:port of the server to which you're sending a request.

How do I skip the GRPC server link and go directly to Proto to generate relevant APIs

I don't understand what you're asking. The point of grpcui is to send RPCs to a server (via web UI). It does not generate anything.

jhump avatar Jun 28 '21 14:06 jhump

Run in to the very same problem as a new user of this tool. As per documentation Proto Source Files (.proto) can be used if the server does not support reflection. The help indicates that -proto flag should be given. The trick here is to put all other cli-flags (and their arguments) before the only required hostname:port argument. eg.

grpcui -proto .\myservice.proto -plaintext localhost:50051

ulkuniem avatar Dec 13 '21 13:12 ulkuniem