Request Policies in Postflow, Response Policies in Preflow

Is there a valid scenario to have Policies in the Request of a PostFlow or policies in the Response of Preflow?

I appreciate if someone can shed some light to this. Every example I see, Postflow has things in the response, and Preflow has things in the Request, which begs the question of why do we even have them?

Solved Solved
0 1 83
1 ACCEPTED SOLUTION

yes, there is great flexibility in how you can configure things in Apigee As one example. there are at least 12 attachment points for policies.

Whether you need these depends on your case.

As an example of when I might want to use a policy attached to a Response Preflow - suppose I Want to cache something specific to a target?

For a Request postflow - maybe I want to use a Condition to check for the presence or absence of a context variable that might be set by one or more of the conditional flows.

These policy attachment points are just options. You do not need to use the options if yuo don't have a need for them .

View solution in original post

1 REPLY 1

yes, there is great flexibility in how you can configure things in Apigee As one example. there are at least 12 attachment points for policies.

Whether you need these depends on your case.

As an example of when I might want to use a policy attached to a Response Preflow - suppose I Want to cache something specific to a target?

For a Request postflow - maybe I want to use a Condition to check for the presence or absence of a context variable that might be set by one or more of the conditional flows.

These policy attachment points are just options. You do not need to use the options if yuo don't have a need for them .