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, ∼4814🔥, 0💬
Popular Posts:
How to create a navigation file like navigation.xhtml for an EPUB 3.0 book? At least one navigation ...
How to send an FTP request with the urllib.request.urlopen() function? If an FTP server supports ano...
How To Open Standard Output as a File Handle in PHP? If you want to open the standard output as a fi...
Where can I download the EPUB 2.0 sample book "The Metamorphosis" by Franz Kafka? You can following ...
What are "*..." and "**..." Wildcard Parameters in Function Definitions? If you want to define a fun...