mirror of https://github.com/Seich/Beau.git
Updated README.
This commit is contained in:
parent
26b33fbf00
commit
8fcd8b9fd3
72
README.md
72
README.md
|
|
@ -12,9 +12,8 @@
|
||||||
|
|
||||||
## What is Beau?
|
## What is Beau?
|
||||||
|
|
||||||
Beau, is a CLI that executes HTTP requests based on a YAML configuration file.
|
Beau is a modern http client. It uses a YAML file as configuration allowing you
|
||||||
This makes testing easy, it allows you to share test requests with others as
|
to test APIs without having to write lengthy commands.
|
||||||
part of your repo.
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -24,52 +23,47 @@ part of your repo.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
⚡ beau --help
|
$ beau [COMMAND]
|
||||||
|
|
||||||
Usage: beau [options] [command]
|
COMMANDS
|
||||||
|
help display help for beau
|
||||||
|
list Lists all available requests in the config file.
|
||||||
Options:
|
request Executes a request by name.
|
||||||
|
validate Validates the given configuration file against Beau's configuration schema.
|
||||||
-V, --version output the version number
|
|
||||||
-h, --help output usage information
|
|
||||||
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
|
|
||||||
request [options] <alias>
|
|
||||||
list [options]
|
|
||||||
|
|
||||||
## Example Configuration File
|
## Example Configuration File
|
||||||
|
|
||||||
version: 1
|
```yaml
|
||||||
endpoint: https://example.com/api/
|
endpoint: https://httpbin.org/
|
||||||
|
|
||||||
POST /session:
|
POST /anything:
|
||||||
ALIAS: session
|
alias: anything
|
||||||
PAYLOAD:
|
payload:
|
||||||
username: seich
|
username: sergio
|
||||||
password: hello01
|
password: password1
|
||||||
|
```
|
||||||
|
|
||||||
GET /profile
|
```
|
||||||
ALIAS: profile
|
$ beau request anything
|
||||||
HEADERS:
|
|
||||||
authorization: Bearer $session.response.body.token
|
|
||||||
|
|
||||||
GET /user/$profile.response.body.id/posts
|
Status Endpoint
|
||||||
ALIAS: friends
|
200 https://httpbin.org/anything
|
||||||
HEADERS:
|
|
||||||
authorization: Bearer $session.response.body.token
|
|
||||||
PARAMS:
|
|
||||||
archived: true
|
|
||||||
|
|
||||||
## Example Usage
|
{
|
||||||
|
...
|
||||||
|
json: {
|
||||||
|
password: "password1",
|
||||||
|
username: "sergio"
|
||||||
|
},
|
||||||
|
method: "POST",
|
||||||
|
url: "https://httpbin.org/anything"
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
beau request profile
|
## Documentation
|
||||||
|
|
||||||
That would execute the profile request along with it´s dependencies. In this
|
Visit https://beaujs.com/docs/ for the complete docs.
|
||||||
case, the session request would be made as well since we are using it´s response
|
|
||||||
value as part of our current request.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue