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, 1357👍, 0💬
Popular Posts:
How to use "json-to-xml" Azure API Policy Statement? The "json-to-xml" Policy Statement allows you t...
How to use the XML to JSON Conversion Tool at jsonformatter.org? If you want to try the XML to JSON ...
What properties and functions are supported on requests.models.Response objects? "requests" module s...
How to dump (or encode, serialize) a Python object into a JSON string using json.dumps()? The json.d...
How to create a new API on the Publisher Portal 2017 version of an Azure API Management Service? If ...