Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add/document way of passing inputs from a file #279

Open
domdorn opened this issue Jan 20, 2022 · 2 comments
Open

add/document way of passing inputs from a file #279

domdorn opened this issue Jan 20, 2022 · 2 comments

Comments

@domdorn
Copy link

domdorn commented Jan 20, 2022

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.

@TeoZosa
Copy link

TeoZosa commented Jan 24, 2022

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!

@domdorn
Copy link
Author

domdorn commented Jan 25, 2022

awesome @TeoZosa , this works!

domdorn added a commit to domdorn/grpcurl that referenced this issue Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants