Skip to content

Commit

Permalink
Update asserting-response.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thePanz authored Nov 18, 2024
1 parent d0c7d02 commit 92f1e1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/asserting-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ after this delimiter, you'll find the implicit asserts, then an `[Asserts]` sect


```hurl
GET https://api/example.org/cats
GET https://example.org/api/cats
HTTP 200
Content-Type: application/json; charset=utf-8 # Implicit assert on Content-Type Header
[Asserts] # Explicit asserts section
Expand Down Expand Up @@ -561,7 +561,7 @@ Alternatively, `matches` predicate support [JavaScript-like Regular expression s
the readability:

```hurl
GET https://sample.org/hello
GET https://example.org/hello
HTTP 200
[Asserts]
Expand All @@ -579,7 +579,7 @@ jsonpath "$.name" matches /Hello [a-zA-Z]+!/
Check that the HTTP received body, decoded as text, matches a regex pattern.

```hurl
GET https://sample.org/hello
GET https://example.org/hello
HTTP 200
[Asserts]
regex "^(\\d{4}-\\d{2}-\\d{2})$" == "2018-12-31"
Expand Down Expand Up @@ -633,7 +633,7 @@ variable "pets" count == 200
Check the total duration (sending plus receiving time) of the HTTP transaction.

```hurl
GET https://sample.org/helloworld
GET https://example.org/helloworld
HTTP 200
[Asserts]
duration < 1000 # Check that response time is less than one second
Expand Down

0 comments on commit 92f1e1f

Please sign in to comment.