gpt4 book ai didi

azure API管理: is there a way to get the operation name in the inbound policy

转载 作者:行者123 更新时间:2023-12-03 01:03:56 29 4
gpt4 key购买 nike

在操作的入站策略中,是否可以使用某种表达式来获取操作名称?就像:在c#反射中获取方法名称。

最佳答案

是的。只需使用“context.Operation.Name”

例如在“设置 header ”策略中

    <set-header name="MyHeader" exists-action="override">
<value>@(context.Operation.Name)</value>
</set-header>

关于 azure API管理: is there a way to get the operation name in the inbound policy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54580169/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com