Skip to content

Utility tool for testing HTTP, websocket, and gRPC endpoints

License

Notifications You must be signed in to change notification settings

quambene/any-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

any-client

Utility tool for testing http, websocket, and grpc endpoints.

Install any-client

git clone git@github.com:quambene/any-client.git
cd any-client
cargo install --path .

Usage

CONFIG_PATH=config.json any-client

Development

cd any-client # path to any-client
CONFIG_PATH=config.json cargo run

Configure HTTP client

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"
        }
    }
}

Configure websocket client

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.

Configure grpc client

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"
        }
    }
}

About

Utility tool for testing HTTP, websocket, and gRPC endpoints

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages