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, 1841👍, 0💬
Popular Posts:
dev.FYIcenter.com is a Website for software developer looking for software development technologies,...
How to add a new operation to an API on the Publisher Dashboard of an Azure API Management Service? ...
How to create the Hello-3.0.epub package? I have all required files to create Hello-3.0.epub. To cre...
How To Pass Arrays By References? in PHP? Like normal variables, you can pass an array by reference ...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...