Skip to main content Svelte Highlight v7.21.1

Hurl language preview

1. GET with asserts

status line, jsonpath, and header predicates
horizon-dark
# list users
GET https://example.org/api/users
HTTP 200
[Asserts]
jsonpath "$.id" == 1
header "Content-Type" contains "json"
atom-one-dark
# list users
GET https://example.org/api/users
HTTP 200
[Asserts]
jsonpath "$.id" == 1
header "Content-Type" contains "json"
github-dark
# list users
GET https://example.org/api/users
HTTP 200
[Asserts]
jsonpath "$.id" == 1
header "Content-Type" contains "json"
dracula
# list users
GET https://example.org/api/users
HTTP 200
[Asserts]
jsonpath "$.id" == 1
header "Content-Type" contains "json"
nord
# list users
GET https://example.org/api/users
HTTP 200
[Asserts]
jsonpath "$.id" == 1
header "Content-Type" contains "json"
github
# list users
GET https://example.org/api/users
HTTP 200
[Asserts]
jsonpath "$.id" == 1
header "Content-Type" contains "json"

2. POST with headers

request headers section and created status
horizon-dark
POST https://example.org/api/users
[Headers]
Content-Type: application/json
HTTP 201
atom-one-dark
POST https://example.org/api/users
[Headers]
Content-Type: application/json
HTTP 201
github-dark
POST https://example.org/api/users
[Headers]
Content-Type: application/json
HTTP 201
dracula
POST https://example.org/api/users
[Headers]
Content-Type: application/json
HTTP 201
nord
POST https://example.org/api/users
[Headers]
Content-Type: application/json
HTTP 201
github
POST https://example.org/api/users
[Headers]
Content-Type: application/json
HTTP 201

3. Captures

comments and captured jsonpath values
horizon-dark
# capture the created id
POST https://example.org/api/users
HTTP 201
[Captures]
id: jsonpath "$.id"
atom-one-dark
# capture the created id
POST https://example.org/api/users
HTTP 201
[Captures]
id: jsonpath "$.id"
github-dark
# capture the created id
POST https://example.org/api/users
HTTP 201
[Captures]
id: jsonpath "$.id"
dracula
# capture the created id
POST https://example.org/api/users
HTTP 201
[Captures]
id: jsonpath "$.id"
nord
# capture the created id
POST https://example.org/api/users
HTTP 201
[Captures]
id: jsonpath "$.id"
github
# capture the created id
POST https://example.org/api/users
HTTP 201
[Captures]
id: jsonpath "$.id"