fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add/document way of passing inputs from a file

domdorn opened this issue · comments

Hello!

I'm trying out grpcurl to test a grpc endpoint. I'm having a hard time doing so cause grcpurl does not support passing a input file.

Please add a way or document (if it already exists) how to load input data from a file.

If I pass a large json either directly with -d "myjson" or with the -d @ .. <<EOM way, I always get "too many arguments" as an error.

Hey @domdorn!

If I pass a large json either directly with -d "myjson" or with the -d @ .. <<EOM way, I always get "too many arguments" as an error.

I was stuck on the same issue as well, have you tried -d "$(cat my.json)" ? (double quotes mandatory to prevent word splitting)

A little hacky but ended up working for me!

awesome @TeoZosa , this works!