Crate hurl

source ·
Expand description

This crate provides a function to run a Hurl formatted content. Hurl uses a plain text format to run and tests HTTP requests. The fully documented format is available at https://hurl.dev

A Hurl sample:

# Get home:
GET https://example.org
HTTP 200
[Captures]
csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"


# Do login!
POST https://example.org/login?user=toto&password=1234
X-CSRF-TOKEN: {{csrf_token}}
HTTP 302

The main function of this crate is runner::run.

This crate works on Windows, macOS and Linux.

Modules§

  • Various HTTP structures like requests, responses, cookies etc.
  • Serialize a Hurl run result to a file.
  • Various reports for Hurl runs (JUnit, HTML etc…) A report aggregates multiple runs into a single unit.
  • A runner for Hurl files. If you want to execute an Hurl file, this is the right place.