grpcurl
grpcurl copied to clipboard
Don't forget to escape in windows
❌ Incorrect
If you run this:
grpcurl -d '{"name": "Go"}' -plaintext localhost:50051 helloworld.Greeter.SayHello
You will get the result:
Too many arguments.
Try 'grpcurl -help' for more details.
✔ Correct
The correct usage is this:
grpcurl -d "{\"name\":\"Go\"}" -plaintext localhost:50051 helloworld.Greeter.SayHello
You can get the expected result:
{
"message": "Hello Go"
}