diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-02-06 03:51:38 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-02-06 03:51:38 +0100 |
| commit | 4134d9f0d55f371a90281fbd78f1975380793210 (patch) | |
| tree | 3a05253852b4d1acac3c057b9d0caa41f7695f5f /README.md | |
| parent | 875a9f93e6616ddb8a71238149eb1384ca177191 (diff) | |
| download | hepi-4134d9f0d55f371a90281fbd78f1975380793210.tar.gz | |
Update readme with basic example
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -6,6 +6,38 @@ Hepi is a command-line tool for testing REST APIs using YAML-based configuration go install github.com/mitjafelicijan/hepi@latest ``` +## Basic example + +```yaml +environments: + local: + host: http://localhost:8080 + +requests: + login: + method: POST + url: "{{host}}/v1/auth/login" + description: "Authenticate and get a token" + headers: + Content-Type: "application/json" + json: + username: "admin" + password: "secret-password" + + get_profile: + method: GET + url: "{{host}}/v1/profile" + description: "Fetch user profile using the token from login" + headers: + Authorization: "Bearer {{login.token}}" + Accept: "application/json" + +groups: + auth_flow: + - login + - get_profile +``` + ## CLI Usage ### Basic Usage |
