10 Chaining

This topic provides the information about chaining of the transformation.

The end-user can define the sequence of transformations for each routing in which the request needs to be processed.

Chaining can be achieved by using the snapshot list. The snapshot list stores the response body and response headers whenever the transformation is processed. Therefore, the end-user can access the response body or headers of all processed transformations at any stage.

Syntax: $snapshot.get(index).body or $snapshot.get(index).headers

Note:

$body and $headers refers to the response body and headers of previous step.

Figure 10-1 Chaining

Chaining

Table 10-1 Snapshot List

Index Body Headers
1 Request Body Request Headers
2 T1 Response Body T1 Response Headers
3 T2 Response Body T2 Response Headers
4 T3 Response Body T3 Response Headers
... ...
N T(N-1) Response Body T(N-1) Response Headers