HTTP Client on terminal, only for requests and responses in JSON
- Set values
- Store values in yaml
- GET request
- Better format for response
- Show values (check command)
- Clear values
- Read file for json body
- POST request
- Add command to get values directly from yaml file
- Add Authentication
- Refactor commands
- Add tests for every command
Set the values needed for the HTTP request
-
Host (-H) The host, default: localhost
-
Path (-D) The path to use on host, default: None
-
Port (-P) The port for request, default: 4000
-
Method (-M) The method for request, default: GET
-
Body (-B) File to use as json body, default None
With the command set yaml <yaml_file> you can add all the request values using a yaml file with the request values setted
Example
host: http://localhost
path: api/storage
port: 8080
method: GET
body: body.jsonDisplays the current values of the HTTP request.
If used without arguments, it lists all set values, if a specific parameter name is provided as an argument, it returns only the value for that parameter.
Restore the values of the HTTP request to the values of the default.yaml provided.
If used without arguments, it restore all set values, if a specific parameter name is provided as an argument, it restore only the value for that parameter.
Send the HTTP request with the values that were set.
We'll use gato.yaml to save the values that were set for the HTTP requests.
host: http://127.0.0.1
path: ""
port: 8000
method: GET
body: ""We'll use default.json to have the default parameters set in case we need to clear data.
{
"host":"http://127.0.0.1",
"path":"",
"port":8000,
"method":"GET",
"body":""
}gato set -H localhost.com -D api/todos -P 4000 -M GET -B body.json
gato send

