2023-07-16 13:07:21 +03:00
|
|
|
# Using --error-format long, the response body
|
|
|
|
# is logged when there are errors. If the response is a kind of
|
|
|
|
# text (like text/html or application/json), the body is logged as text,
|
|
|
|
# otherwise as a binary.
|
|
|
|
GET http://localhost:8000/error-format-long/html
|
2023-05-25 17:28:10 +03:00
|
|
|
HTTP 200
|
|
|
|
Content-Type: text/html
|
|
|
|
[Asserts]
|
2023-06-18 15:35:03 +03:00
|
|
|
xpath "string(//head/title)" == "Welcome!"
|
2023-05-25 17:28:10 +03:00
|
|
|
xpath "//foo" isEmpty
|
|
|
|
xpath "//title" count == 2
|
2023-07-16 13:07:21 +03:00
|
|
|
|
|
|
|
|
|
|
|
GET http://localhost:8000/error-format-long/json
|
|
|
|
HTTP 200
|
|
|
|
Content-Type: application/json
|
|
|
|
[Asserts]
|
|
|
|
jsonpath "$.books" count == 12
|
|
|
|
|
|
|
|
|
|
|
|
# RFC-7807 application/problem+json is also supported
|
|
|
|
GET http://localhost:8000/error-format-long/rfc-7807
|
|
|
|
HTTP 200
|
|
|
|
Content-Type: application/problem+json
|
|
|
|
[Asserts]
|
|
|
|
jsonpath "$.title" == "You have enough credit."
|