Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 864 Bytes

test-request.md

File metadata and controls

44 lines (35 loc) · 864 Bytes

test-request Action

Used in FLAT tests to call the FLAT app under test.

Syntax

<test-request>
{
  "path": "/api/path"
}
</test-request>

All request parameters and options can be used:

<test-request>
{
  "path": "/api/path",
  "method": "POST",
  "headers": {
    "X-Foo": "bar"
  },
  "body": {
    "value": {
      "user": "alice"
    }
  }
}
</test-request>

The test-request sets these variables to inspect the result (with assert):

  • $status the HTTP status code (number)
  • $response the response body (string)
  • $headers the response headers (array)

See also