diff --git a/.gitignore b/.gitignore index 9b6c7cf..3baf93c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ .env.* lac -example/ diff --git a/README.md b/README.md index 2ce6689..edc4894 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/docs/Manual.md b/docs/UserGuide.md similarity index 100% rename from docs/Manual.md rename to docs/UserGuide.md diff --git a/docs/images/carbon.png b/docs/images/carbon.png new file mode 100755 index 0000000..f10a263 Binary files /dev/null and b/docs/images/carbon.png differ diff --git a/docs/images/cli.png b/docs/images/cli.png deleted file mode 100755 index d5a4822..0000000 Binary files a/docs/images/cli.png and /dev/null differ diff --git a/examples/get.json b/examples/get.json new file mode 100644 index 0000000..e17e54b --- /dev/null +++ b/examples/get.json @@ -0,0 +1,4 @@ +{ + "path": "${host}/get", + "method": "GET" +} diff --git a/examples/post.json b/examples/post.json new file mode 100644 index 0000000..bcc2414 --- /dev/null +++ b/examples/post.json @@ -0,0 +1,10 @@ +{ + "path": "${host}/post", + "method": "POST", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "key": "value" + } +} diff --git a/examples/variables.json b/examples/variables.json new file mode 100644 index 0000000..874034a --- /dev/null +++ b/examples/variables.json @@ -0,0 +1,3 @@ +{ + "host": "https://httpbin.org" +}