【发布时间】:2021-07-12 11:45:49
【问题描述】:
我正在使用政策提出请求。我需要检查该请求的状态代码
我尝试过使用
<choose>
<when condition="@(((IResponse)context.Variables["LogFailedEvent"]).StatusCode != 200)">
</when>
</choose>
甚至
<choose>
<when condition="@(context.Response.StatusCode != 200)">
</when>
</choose>
但它会引发类似key not present in dictionary 的错误
有人有想法/解决方案吗?
【问题讨论】:
标签: azure response azure-api-management azure-policy inbound