Tools, FAQ, Tutorials:
'choose ... when ...' Statements to Control Execution Flows
How to use 'choose ... when ..." policy statements to control execution flows?
✍: FYIcenter.com
If you want to control execution flows in Azure API management process,
you can use the 'choose ... when ..." policy statement.
The "choose ... when ..." statement has the following syntax:
<choose>
<when condition="Boolean_expression">
...
</when>
<when condition="Boolean_expression">
...
</when>
<otherwise>
...
</otherwise>
</choose>
For example,
<choose>
<when condition="@(context.Variables.GetValueOrDefault<bool>("isMobile"))">
<set-query-parameter name="mobile" exists-action="override">
<value>true</value>
</set-query-parameter>
</when>
<otherwise>
<set-query-parameter name="mobile" exists-action="override">
<value>false</value>
</set-query-parameter>
</otherwise>
</choose>
⇒ Policy to Modify Request and Response Body
2018-01-19, ∼4327🔥, 0💬
Popular Posts:
Where to find tutorials on Using Azure API Management Publisher Dashboard? Here is a list of tutoria...
How to reinstall npm with a node version manager? I am getting permission errors with the current ve...
How to decode the id_token value received from Google OpenID Connect authentication response? Accord...
How to register and get an application ID from Azure AD? The first step to use Azure AD is to regist...
How to login to the Developer Portal internally by you as the publisher? Normally, the Developer Por...