Skip to content

Conversation

@domdorn
Copy link

@domdorn domdorn commented Jan 25, 2022

No description provided.

Sometimes it might be necessary to read the payload from a file. This worked for some users:

```shell
grpcurl -d "$(cat my.json)" grpc.server.com:443 my.custom.server.Service/Method
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the more straight-forward way, that doesn't require this particular feature in your shell, is to use the @ value as the input, very much like the example above.

Suggested change
grpcurl -d "$(cat my.json)" grpc.server.com:443 my.custom.server.Service/Method
grpcurl -d @ grpc.server.com:443 my.custom.server.Service/Method < my.json

EOM
```

Sometimes it might be necessary to read the payload from a file. This worked for some users:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This worked for some users" -- this wording feels really non-committal. We can make it authoritative.

Suggested change
Sometimes it might be necessary to read the payload from a file. This worked for some users:
To use a file as the request payload, redirect the file to `grpcurl`'s stdin:

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

Successfully merging this pull request may close these issues.

2 participants