Update README.md (#353)

Updating README to add information about  the usage of headers/metadata in the rpc request.
This commit is contained in:
ironhide0396
2024-10-11 20:10:52 +05:30
committed by GitHub
parent cdb43b08fa
commit fb49f049e6

View File

@@ -145,6 +145,13 @@ grpcurl -d @ grpc.server.com:443 my.custom.server.Service/Method <<EOM
} }
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 ### Listing Services
To list all services exposed by a server, use the "list" verb. When using `.proto` source To list all services exposed by a server, use the "list" verb. When using `.proto` source