grpcurl curl for gRPC
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
grpcurl -plaintext <host:port> list
grpcurl -plaintext <host:port> list
<service>
grpcurl -plaintext <host:port> describe
<symbol>
grpcurl -plaintext <host:port>
<service>/<method>
grpcurl -plaintext -d '<json>'
<host:port> <service>/<method>
grpcurl -H '<name>: <value>' ...
grpcurl -proto <file> ...
grpcurl -v ...Concepts
- grpcurl flags + JSON
- gRPC server host:port
- Reflection or -proto / -protoset
Discover
grpcurl <host:port> list
grpcurl <host:port> list <service>
grpcurl <host:port> describe
grpcurl <host:port> describe <service>
grpcurl <host:port> describe
<service>.<method>
grpcurl <host:port> describe <message>
grpcurl -msg-template <host:port> describe
<message>
grpcurl -protoset <file> list
grpcurl -import-path <dir> -proto <file>
list
Call
grpcurl <host:port>
<service>/<method>
grpcurl -d '<json>' <host:port>
<service>/<method>
grpcurl -d @ <host:port>
<service>/<method>
grpcurl -format text -d '<text>'
<host:port> <service>/<method>
grpcurl -emit-defaults ...
grpcurl -allow-unknown-fields ...
grpcurl -max-time <secs> ...
grpcurl -connect-timeout <secs> ...
grpcurl -max-msg-sz <bytes> ...
grpcurl -format-error ...
grpcurl -version
Connection and TLS
grpcurl -plaintext <host:port> ...
grpcurl -insecure <host:port> ...
grpcurl -cacert <file> <host:port> ...
grpcurl -cert <file> -key <file>
<host:port> ...
grpcurl -authority <name> ...
grpcurl -servername <name> ...
grpcurl -keepalive-time <secs> ...
grpcurl -user-agent <value> ...
Metadata
grpcurl -H '<name>: <value>' ...
grpcurl -rpc-header '<name>: <value>'
...
grpcurl -reflect-header '<name>:
<value>' ...
grpcurl -expand-headers -H 'authorization: Bearer
${TOKEN}' ...
grpcurl -v ...grpcurl -vv ...Schema sources
grpcurl -proto <file> -import-path <dir>
...
grpcurl -protoset <file> ...
grpcurl -use-reflection=false ...
grpcurl -protoset-out <file> <host:port>
describe <service>
grpcurl -proto-out-dir <dir> <host:port>
describe <service>
protoc --descriptor_set_out=<file> --include_imports
<proto>
Recipes
grpcurl -plaintext localhost:50051 listgrpcurl -plaintext localhost:50051 list my.pkg.Greetergrpcurl -plaintext localhost:50051 describe my.pkg.HelloRequest
grpcurl -H "authorization: Bearer $TOKEN" \ -d '{"name":"world"}' \ api.example.com:443 my.pkg.Greeter/SayHello
grpcurl -plaintext -d '{"id":1}' localhost:50051 \ my.pkg.Items/Get | jq '.name'
grpcurl -import-path ./protos -proto items.proto \ -d @ localhost:50051 my.pkg.Items/Create < req.json



