Chaining client requests triggers events or secondary client requests after an initial HttpClient request has completed.
Prerequisites: The httpClient palette is open. An initial client request (GET, POST or PUT) has been configured.
- Expand ResponseChaining and Conditions in the palette.
- Do one of the following:
- To add a request to an HttpClient, drag a ResponseTrigger to your HttpClient component in the station.
- To add a request to an HttpClientDevice, expand and add the ResponseTrigger to the Proxy Ext node in the Nav tree.
- To set up the logical criteria that need to be fulfilled, do one or more of the following:
- Select a response code from the
Fire On
drop-down list.
- Expand the ResponseTrigger and drag a condition (BodyContains and/or HeaderContains) from the palette to the Conditions folder.
- If you added a condition, expand it, set up the condition and configure
Not
appropriately.In this example, the trigger only fires when the response received by the parent client:
- includes the text status: ok in the response body.
- includes a
Content-Type
header value of application/json.
All other responses prevent the trigger from firing.
Setting the Not
value to true
negates the defined logic of a condition. If you have multiple conditions defined, the default logic is to require all to
be true. Set the And
property to false
and only one of the conditions needs to be true.
NOTE: Both the Fire On
response code, and condition logic in the Conditions folder must both be true for the trigger to fire.