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?
|
||||
|
||||
Beau, is a CLI that executes HTTP requests based on a YAML configuration file.
|
||||
This makes testing easy, it allows you to share test requests with others as
|
||||
part of your repo.
|
||||
Beau is a modern http client. It uses a YAML file as configuration allowing you
|
||||
to test APIs without having to write lengthy commands.
|
||||
|
||||

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