Tools, FAQ, Tutorials:
Use Custom Variables in Policy Expressions
How to use custom variables created by "set-variable" statements in policy expressions?
✍: FYIcenter.com
If you want to access custom variables created by "set-variable" statements,
you can use the IReadOnlyDictionary object through "context.Variables".
For example, the following policy creates a custom variable during the inbound processing step and used it in the output processing step:
<inbound>
<set-variable name="method" value="@(context.Request.Method)"/>
</inbound>
<outbound>
<trace source="DEBUG">@(context.Variables["method"])</trace>
</outbound>
⇒ 'choose ... when ...' Statements to Control Execution Flows
2018-01-24, ∼3465🔥, 0💬
Popular Posts:
How to access Request body from "context.Request.Body" object in Azure API Policy? Request body is t...
How to run PowerShell Commands in Dockerfile to change Windows Docker images? When building a new Wi...
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...
How to use the "forward-request" Policy Statement to call the backend service for an Azure API servi...
How to Build my "sleep" Docker image from the Alpine image? I want the container to sleep for 10 hou...