Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sethetter/reqq
Something like insomnia or postman, but a CLI.
https://github.com/sethetter/reqq
hacktoberfest
Last synced: 12 days ago
JSON representation
Something like insomnia or postman, but a CLI.
- Host: GitHub
- URL: https://github.com/sethetter/reqq
- Owner: sethetter
- Created: 2020-08-30T02:32:35.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-29T19:33:17.000Z (about 1 year ago)
- Last Synced: 2024-06-20T00:41:14.901Z (5 months ago)
- Topics: hacktoberfest
- Language: Rust
- Homepage:
- Size: 154 KB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# reqq
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.## Install
```
cargo install reqq
```## Usage
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` files
Reqq uses [handlebars](https://docs.rs/handlebars/3.4.0/handlebars/) as the templating
engine, so anything that's fair game there is fair game in `.reqq` files.## Commands
- `reqq [--env=] `, executes a request.
- `reqq list`, lists all available requests.
- `reqq envs`, lists available envs.