Skip to content
/ qli Public

🐳 extremelly small rust binary to generate http requests using json/yaml

License

Notifications You must be signed in to change notification settings

ibnz36/qli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qli 🐳

Extremelly small rust binary to generate http requests using json/yaml.

License GitHub issues Build status

Installation

Requires cargo (rustlang)

For the CLI, run cargo install qli and use it with the qli command. For the library, just run cargo add qli

Usage (library)

qli exports 2 functions, from_yaml and from_json, which generate and send a web request and return an anyhow result with the response. It also exports the RequestConfig struct, but it isn't realy useful outside the library.

Usage (CLI)

Command usage:

qli

USAGE:
    qli [FLAGS] [OPTIONS] <path>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
    -v, --verbose

OPTIONS:
    -o, --output <output>

ARGS:
    <path>

example yaml/json file structure:

# test.yaml

url: http://localhost:3000
method: get
headers:
    X-header1: my-header
body: |
    { "abc": "dce" }
// test.json

{
    "url": "https://localhost:3000",
    "method": "get",
    "headers": {
        "my-header": "1234"
    },
    "body": "my body"
}

note that for simplicty reasons body needs to be a string, so we recommend using yaml if you want to have an easier time writing json bodies.

Acknowledgments

This project was inspired by requestr, which is licensed under the MIT License. The original license can be found here.

About

🐳 extremelly small rust binary to generate http requests using json/yaml

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project