Hurl 1.5.0, a command line to run and test HTTP requests with plain text, curl and Rust
We're releasing Hurl 1.5.0, a simple HTTP cli tool built on top of libcurl and Rust.
Hurl allows running HTTP requests defined in a plain text format. It can be used to fetch data, or play a scenario (sequence of requests), asserting responses along the way. With its textual format, it is aimed for both devops and developers. With its command-line usage/simple unique binary, it is aimed for both local dev and continuous integration.
An Hurl sample:
GET https//example.org/books
HTTP/1.1 200
[Asserts]
jsonpath "$.validated" == true
jsonpath "$.books" count == 12
jsonpath "$.books[2].name" == "Dune"
Multiple requests can be chained to test HTML/JSON responses:
# Get home:
GET https://example.net
HTTP/1.1 200
[Captures]
csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"
# Do login!
POST https://example.net/login?user=toto&password=1234
X-CSRF-TOKEN: {{csrf_token}}
HTTP/1.1 302
For this release, we have added improvements:
- globs support on all platform, even on Windows
- add JUnit report output
- add X.509 certificates
- JSON ouput
- environnement variables for Hurl variables
- and a lot of nasty bugs!
We will be very happy to have feedbacks on Hurl if you try ii!