Define executable HTTP requests as text files
make binary && cat ./examples/multiple.http | ./goreq
make install
echo """#!/usr/local/bin/goreq
GET https://reddit.com HTTP/1.1""" > reddit.http
chmod +x reddit.http
./reddit.http
make dev
-
Environment variables substitution - https://github.com/a8m/envsubst
-
Sanitize request
- Allow missing http version
- missing newlines
-
Pretty print
- headers
- body
-
Assert response
- Expect - add expect flag which takes an int representing a http status code and matches it against the last request performed - return nonzero exit code in case of mismatch
- ... Take list of ints?
-
Possible do the above in a different app which would read and parse the response (the output of this app)?