grpcurl command builder

Fill in the address, the method, the JSON body, metadata and TLS, and copy a grpcurl command that runs as written. The form quotes every value for the shell and warns about the mistakes grpcurl rejects. It runs in this page; nothing you type is sent anywhere.

Updated

Worked example

Call GetOrder on a TLS server with a bearer token, a request ID and a five-second deadline. The form gives:

grpcurl \
  -H 'authorization: Bearer eyJhbGciOi...' \
  -H 'x-request-id: debug-17' \
  -max-time 5 \
  -d '{"orderId": "ord_1842"}' \
  'api.example.com:443' \
  'shop.v1.Orders/GetOrder'

What each flag does

FlagWhat it does
-plaintextConnects without TLS. grpcurl uses TLS unless you pass it
-insecureUses TLS but skips checking the server's certificate. For a server you control only
-cacertTrusts the CA in this PEM file, such as your company's internal CA
-cert, -keyYour client certificate and key, for mutual TLS
-authorityOverrides the :authority header, for a proxy that routes by host name
-H 'key: value'Adds request metadata, such as authorization. Repeat it for each header
-max-timeThe whole call's deadline, in seconds
-import-path, -protoLoad the schema from .proto files when the server has no reflection
-emit-defaultsPrints response fields that hold their default values instead of leaving them out
-dThe request body as JSON. -d @ reads it from standard input

Mistakes the form catches

  • An address with https:// in front. grpcurl takes host:port, and needs the port even for 443.
  • A method without its package, or with a leading slash typed as part of the path.
  • A body that is not valid JSON, which grpcurl rejects before it connects.
  • A client certificate without its key, or the other way round.
  • Metadata keys in capitals, which gRPC sends lowercased anyway.

list and describe ask the server's reflection service instead of calling a method; they are how you find the method name to call. See calling a server with reflection.

istek writes this command for any request with Request ▸ Copy as grpcurl, and runs the call itself in a native Mac app. See istek.

istek, $29 once

macOS 14.0+ · Apple Silicon · no account, no telemetry

Buy istek · $29