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
| Flag | What it does |
|---|---|
-plaintext | Connects without TLS. grpcurl uses TLS unless you pass it |
-insecure | Uses TLS but skips checking the server's certificate. For a server you control only |
-cacert | Trusts the CA in this PEM file, such as your company's internal CA |
-cert, -key | Your client certificate and key, for mutual TLS |
-authority | Overrides 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-time | The whole call's deadline, in seconds |
-import-path, -proto | Load the schema from .proto files when the server has no reflection |
-emit-defaults | Prints response fields that hold their default values instead of leaving them out |
-d | The request body as JSON. -d @ reads it from standard input |
Mistakes the form catches
- An address with
https://in front. grpcurl takeshost: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.