Skip to content

Commit

Permalink
docs: update documentation and add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
eynopv committed Jun 19, 2024
1 parent 16c523d commit 08d7223
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
.env.*

lac
example/
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`lac` is a cli only API client. It can be used for API exploration and testing.

![screenshot of lac](docs/images/cli.png)
![screenshot of lac](docs/images/carbon.png)

## Installation

Expand All @@ -15,10 +15,30 @@ go install github.com/eynopv/lac@latest
## Usage

```sh
lac [command]
lac [flags] request.json
```

Read [manual](docs/Manual.md)
### Example

**Create request object**

```js
// get.json

{
"path": "https://httpbin.org/get"
}
```

**Send the request**

```sh
$ lac get.json
```

### Guide

Read [user guide](docs/UserGuide.md)

## License

Expand Down
File renamed without changes.
Binary file added docs/images/carbon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/cli.png
Binary file not shown.
4 changes: 4 additions & 0 deletions examples/get.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"path": "${host}/get",
"method": "GET"
}
10 changes: 10 additions & 0 deletions examples/post.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"path": "${host}/post",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": {
"key": "value"
}
}
3 changes: 3 additions & 0 deletions examples/variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"host": "https://httpbin.org"
}

0 comments on commit 08d7223

Please sign in to comment.