Used in FLAT tests to call the FLAT app under test.
<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)
Testing API Requests (cookbook)
Testing Upstream Requests (cookbook)
Testing (reference)