Command line interface for HTTP requests defined in yaml configuration file
Project description
ADZ
Command line interface for HTTP requests defined in yaml configuration file.
Quick start
Having a yaml configuration file
endpoints:
endpoint:
request: GET http://localhost:8000/
headers:
Content-Type: application/json
and running on command line
adz endpoint
will print
HTTP/1.0 200 OK
GET http://localhost:8000/endpoint/
Content-Type: application/json
Content-Length: 123
Server: Server/0.1.2
Date: Thu, 06 Jun 2019 06:06:06 GMT
{
...
}
Configuration
For an example configuration look at docs/example.yml.
settings
- colors:
bool
, default:true
- control output print in colors
- response:
bool
, default:true
- control response body output
- theme:
str
, defaultnative
- any theme name from here should work
variables
- used to interpolate values in headers and url
variable: abc
applied onurl: http://example.org/$variable
results inhttp://example.org/abc
endpoints
- description
- method
- http methods
- url
- request
method url
e.g.get http://example.org
- params
- query string parameters
- headers
- json
- json string
- string starting with
file://
is loaded as json file
- data
- json string
- string starting with
file://
is loaded as json file
- cookies
- files
- path to a file:
path/to/file.txt
- file name and path:
filename: path/to/file.txt
- path to a file:
Configuration file
Expected configuration file names
adz.yaml
oradz.yml
api.yaml
orapi.yml
rest.yaml
orrest.yml
Expected locations
- current location:
.
- user's home:
~/
.adz
directory in user's home e.g.~/.adz/
Configuration file path can also be set using environmental variable ADZ
.
CLI
Run adz -h
License
ADZ is licensed under a three clause BSD License. Full license text can be found here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
adz-0.1.0.tar.gz
(8.8 kB
view hashes)