Hi Hurl maintainer here, happy to answer any question and get feedbacks!
replies(7):
Those basically go in the form
POST http://localhost:8080/api/foo
Content-Type: application/json
{ "some": "body" }
And then we have a 1-to-1 mapping of "expected.json" outputs for integration tests.We use a bespoke bash script to run these .http file with cURL, and then compare the outputs with jq, log success/failure to console, and write "actual.json"
Can I use HURL in a similar way? Essentially an IDE-runnable example HTTP request that references a JSON file as the expected output?
And then run HURL over a directory of these files?
I really like it because it serves 3 purposes:
- API docs/examples that you can interact with
- Test cases
- Manually invoking API endpoints when working on the underlying code, in an iterative loop