There are a number of different responses which can progress a flow. All require a 2xx response code, and they are differentiated by the X-DF-Response-Type header, as described by the following table:
| Response Type Header Value | Response Type |
|---|---|
step | Step |
action | Action Response Body |
modal | Modal Response Body |
no-op | No Op Response Body |
subflow | Subflow Response Body |
exit | Exit Response, see below. |
If no header is provided, the response is assumed to be a Step.
A response is determined to be an Exit when the status code is in the 200-299 range, and either the exit property in the triggering action was set to true, or the response includes the X-DF-Response-Type: exit header.
On receiving an exit response, the client will merge the action.result into the response body, and exit the flow with the merged value as the result.
Note that when the triggering action has exit: true, the X-DF-Response-Type header is ignored.
If a DF endpoint may be consumed by browser-based web clients from a different origin, the X-DF-Response-Type header must be exposed via CORS. Ensure that the Access-Control-Expose-Headers header includes X-DF-Response-Type, for example:
Access-Control-Expose-Headers: X-DF-Response-Type, Other-Header
This is not required for same-origin web clients or native mobile clients.
| Value | Description |
|---|---|
Action | |
Exit | |
Modal | |
NoOp | |
Step | |
Subflow |