Utility tool for testing http, websocket, and grpc endpoints.
- Install any-client
- Usage
- Development
- Configure HTTP client
- Configure websocket client
- Configure grpc client
git clone git@github.com:quambene/any-client.git
cd any-client
cargo install --path .
CONFIG_PATH=config.json any-client
cd any-client # path to any-client
CONFIG_PATH=config.json cargo run
Create config file, e.g. config.json
, with content:
{
"client": "http",
"api": {
"url": "https://...",
"endpoint": "/my_endpoint"
},
"request": {
"method": "POST",
"headers": [{"key": "MY_KEY", "value": "my_value"}],
"body": {
"myKey": "my_value"
},
"queryString": {
"myKey": "my_value"
}
}
}
Create config file, e.g. config.json
, with content:
{
"client": "websocket",
"api": {
"url": "wss://my_url.com",
"endpoint": "/my_endpoint"
},
"subscription": {
"query_string": {
"myParam1": "my_value1",
"myParam2": "my_value2"
},
"request": {
"myKey": "my_value"
}
}
}
where query_string
and request
are optional. The query_string
is leading to the url wss://my_url.com/my_endoint?myParam1=my_value1&myParam2=my_value2
.
Create config file, e.g. config.json
, with content:
{
"client": "grpc",
"api": {
"url": "https://...",
},
"proto": {
"path": "my_proto_dir",
"file": "my_proto_file.proto",
"package": "my_package",
"service": "MyService",
"method": "MyMethod",
"message": "MyMessage",
"request": {
"myKey": "my_value"
}
}
}