Crates.io | reqq |
lib.rs | reqq |
version | 0.4.0 |
source | src |
created_at | 2020-09-05 00:09:11.915968 |
updated_at | 2023-10-29 19:31:20.123884 |
description | A tool for sending predefined HTTP requests in your projects. |
homepage | |
repository | |
max_upload_size | |
id | 284897 |
size | 59,653 |
A cli for making HTTP requests from predefined request files.
Expects available requests to be in a local .reqq
folder.
Environments can be configured with arbitrary variables that can be embedded in request
files inside of an .reqq/envs/
folder.
cargo install reqq
Request file at .reqq/create-user.reqq
.
POST {{ baseUrl }}/api/v1/users
X-Secret-Header: {{ secret }}
{ "username": "yep", "password": "nope" }
Env config at .reqq/envs/test.json
.
{ "baseUrl": "https://example.com", "secret": "lolol" }
Then this command will issue the request!
reqq --env=test create-user
Env config can also be provided through extra arguments CLI command. Env args provided on the CLI will override varibles of the same name in the env config file.
reqq -a arg1=val1 -a arg2=val2 create-user
If you provide no environment, it will attempt to load .reqq/envs/default.json
.
.reqq
filesReqq uses handlebars as the templating
engine, so anything that's fair game there is fair game in .reqq
files.
reqq [--env=<env>] <request>
, executes a request.reqq list
, lists all available requests.reqq envs
, lists available envs.