jlucasnsilva / httpreq

Make HTTP calls using YAML description files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP Request

1 - Create the file example.yml by runnig $ httpreq new example. You'll get the following content:

given:
  https: false
  host: localhost
  port: "8080"
  headers:
    Authorization: Bearer my.awesome.token
then:
- call: POST /api/v1/login
  id: login
  with_headers:
    X-Parameter: magic
  and_send: '{ "email": "{{ .email }}", "password": "{{ .password }}" }'
where:
  email: mr.frodo@lotr.com
  password: $PASSWORD

2 - On another terminal start the echo server with $ httpreq echo;

3 - Then run $ PASSWORD=123456 httpreq exec example.yml;

About

Make HTTP calls using YAML description files

License:Apache License 2.0


Languages

Language:Go 100.0%