When developing a web app I often find myself keeping a file with a bunch of http/curl/wget commands which I use for testing.
Being able to define such HTTP requests in a simple readable format resembling the HTTP standard makes sense.
This could also be used for E2E or integration testing.
Method Request-URI
Header-field: Header-value
...
Request-Body
A file can contain multiple requests separated by three hash signs (###). Please see examples/heads.http
Evaluate shell expressions in the request body using $(expression)
. Please see examples/postman.http
GET http://httpbin.org/
Connection: keep-alive
Accept: text/html
Accept-Language: en-US,en;q=0.9,es;q=0.8
Please see the examples/ folder for more.
pip3 install dothttp
dothttp examples/request.http
Or
dothttp examples/request.http examples/httpbin.http ...
Or
dothttp examples/*.http
Or
echo "GET https://www.google.com" | dothttp -
- Request URI needs to be absolute
- If the "Host" header is not set the hostname from the Request-URI is used
1.3.0
- Request-Body Shell Expressions
1.2.0
- Multi request files
1.1.0
- Syntax highlighting of output
1.0.1
- Bug fix
1.0.0
- Initial release