【问题标题】:How to get the formparam values in hosted target in apigee如何在 apigee 中获取托管目标中的 formparam 值
【发布时间】:2019-09-02 10:48:50
【问题描述】:

如何获取assignmessage策略中设置的formparam值

<AssignMessage continueOnError="false" enabled="true" name="add-formparams-3">
  <Add>
    <FormParams>
      <FormParam name="name">{request.queryparam.name}</FormParam>
      <FormParam name="zip">{request.queryparam.zipCode}</FormParam>
      <FormParam name="lang">{request.queryparam.lang}</FormParam>
    </FormParams>
  </Add>
  <AssignTo transport="http" type="request"/>
</AssignMessage>

【问题讨论】:

    标签: apigee


    【解决方案1】:
    var paramName = context.getVariable("request.queryparam.name");
    var paramZip = context.getVariable("request.queryparam.zip");
    var paramLang = context.getVariable("request.queryparam.lang");
    

    var paramName = context.getVariable("request.queryparam.name");
    var paramZip = context.getVariable("request.queryparam.zipCode");
    var paramLang = context.getVariable("request.queryparam.lang");
    

    以上来自{request.queryparam.xxx}

    【讨论】:

      猜你喜欢
      • 2014-11-09
      • 1970-01-01
      • 1970-01-01
      • 2013-12-17
      • 2013-02-16
      • 1970-01-01
      • 2014-05-02
      • 2015-10-24
      • 2014-07-31
      相关资源
      最近更新 更多