Index of every page on this site: llms.txt
All skills
Run it yourself

Run and test HTTP requests with Hurl. Use when working with HTTP APIs, testing web services, or creating HTTP-based test scenarios. Hurl allows you to define HTTP requests in plain text files and validate responses with asserts and captures.

Use this Skill: https://skilld.dev/gh/jyasuu/cheat-sheet/hurl

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

response.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Response

Definition

Responses can be used to capture values to perform subsequent requests, or add asserts to HTTP responses. Response on requests are optional, a Hurl file can just consist of a sequence of requests.

A response describes the expected HTTP response, with mandatory version and status, followed by optional headers, captures, asserts and body. Assertions in the expected HTTP response describe values of the received HTTP response. Captures capture values from the received HTTP response and populate a set of named variables that can be used in the following entries.

Example

GET https://example.org
HTTP 200
Last-Modified: Wed, 21 Oct 2015 07:28:00 GMT
[Asserts]
xpath "normalize-space(//head/title)" startsWith "Welcome"
xpath "//li" count == 18

Structure

<div class="hurl-structure-schema"> <div class="hurl-structure"> <div class="hurl-structure-col-0"> <div class="hurl-part-0"> HTTP 200 </div> <div class=" hurl-part-1"> content-length: 206<br>accept-ranges: bytes<br>user-agent: Test </div> <div class="hurl-part-2"> [Captures]<br>... </div> <div class="hurl-part-2"> [Asserts]<br>... </div> <div class="hurl-part-3"> {<br> &nbsp;&nbsp;"type": "FOO",<br> &nbsp;&nbsp;"value": 356789,<br> &nbsp;&nbsp;"ordered": true,<br> &nbsp;&nbsp;"index": 10<br> } </div> </div> <div class="hurl-structure-col-1"> <div class="hurl-request-explanation-part-0"> <a href="/docs/asserting-response.html#version-status">Version and status (mandatory if response present)</a> </div> <div class="hurl-request-explanation-part-1"> <br><a href="/docs/asserting-response.html#headers">HTTP response headers</a> (optional) </div> <div class="hurl-request-explanation-part-2"> <br> <br> </div> <div class="hurl-request-explanation-part-2"> <a href="/docs/capturing-response.html">Captures</a> and <a href="/docs/asserting-response.html#asserts">asserts</a> (optional sections, unordered) </div> <div class="hurl-request-explanation-part-2"> <br> <br> <br> <br> </div> <div class="hurl-request-explanation-part-3"> <a href="/docs/asserting-response.html#body">HTTP response body</a> (optional) </div> </div> </div> </div>

Capture and Assertion

With the response section, one can optionally capture value from headers, body, or add assert on status code, body or headers.

Body compression

Hurl outputs the raw HTTP body to stdout by default. If response body is compressed (using br, gzip, deflate), the binary stream is output, without any modification. One can use --compressed option to request a compressed response and automatically get the decompressed body.

Captures and asserts work automatically on the decompressed body, so you can request compressed data (using Accept-Encoding header by example) and add assert and captures on the decoded body as if there weren't any compression.

Timings

HTTP response timings are exposed through Hurl structured output (see --json), HTML report (see --report-html) and JSON report (see --report-json).

On each response, libcurl response timings are available:

  • time_namelookup: the time it took from the start until the name resolving was completed. You can use --resolve to exclude DNS performance from the measure.
  • time_connect: The time it took from the start until the TCP connect to the remote host (or proxy) was completed.
  • time_appconnect: The time it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. The client is then ready to send its HTTP GET request.
  • time_starttransfer: The time it took from the start until the first byte was just about to be transferred (just before Hurl reads the first byte from the network). This includes time_pretransfer and also the time the server needed to calculate the result.
  • time_total: The total time that the full operation lasted.

All timings are in microsecond.

<div class="picture"> <img class="u-theme-light u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/timings-light.svg" alt="Response timings explanation"/> <img class="u-theme-dark u-drop-shadow u-border u-max-width-100" src="/docs/assets/img/timings-dark.svg" alt="Response timings explanation"/> <a href="https://blog.cloudflare.com/a-question-of-timing/"><small>Courtesy of Cloudflare</small></a> </div>

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning25d4 checks · Risk SAFE
  • Gen Agent Trust Hub25d

    This skill provides documentation and examples for Hurl, a command-line tool for running and testing HTTP requests. It details request formatting, response assertions, variable captures, and test execution. The analysis found no security issues; the tool operates as a standard HTTP client and includes documentation on secure secret handling.

  • Socket25d

    No alerts

  • Snyk25d

    Risk: LOW · No issues

  • Runlayer8mo

    9/9 files flagged

Signed by skilld at d3e2684. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 10 months ago

README badge

README badge for jyasuu/cheat-sheet/hurl