Update README.md

Updating README to add information about  the usage of headers/metadata in the rpc request.
This commit is contained in:
ironhide0396 2022-12-01 10:26:55 +05:30 committed by GitHub
parent 61a9c00d87
commit 895a14a86f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -145,6 +145,13 @@ grpcurl -d @ grpc.server.com:443 my.custom.server.Service/Method <<EOM
}
EOM
```
### Adding Headers/Metadata to Request
Adding of headers / metadata to a rpc request is possible via the `-H name:value` command line option. Multiple headers can be added in a similar fashion.
Example :
```shell
grpcurl -H header1:value1 -H header2:value2 -d '{"id": 1234, "tags": ["foo","bar"]}' grpc.server.com:443 my.custom.server.Service/Method
```
For more usage guide, check out the help docs via `grpcurl -help`
### Listing Services
To list all services exposed by a server, use the "list" verb. When using `.proto` source