我们如何在使用ADF调用API \ Web服务时构造头文件。 [英] How do we construct headers while calling API\Web services using ADF.?

查看:89
本文介绍了我们如何在使用ADF调用API \ Web服务时构造头文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要使用clientid和secret来调用API,这会给我一个令牌和刷新。我将不得不在http标头中使用它再次调用api来获取我所需的数据。我可以用其他工具做到这一点,并试图找出我们是否可以使用
ADF来做到这一点,而无需编写任何代码。





问候,


Sai

解决方案

你好,


您可以在使用Web Activity调用API时在ADF中设置标头,并使用活动的输出来获取令牌和刷新。




要在后续活动(复制或Web活动)中使用此Web活动的输出,您可以使用:

  {
" foo":" bar",
" some":" value"
}

@ activity('Web1')。output.foo


获取foo的值。


<希望这会有所帮助。


Hi,

i need to call an API with clientid and secret , which gives me token and refreshtoken. i will have to use it in http header to call the api again to get my required data. i am able to do that with other tools and trying to find out if we can do that using ADF without writing any code.


Regards,

Sai

解决方案

Hi there,

You can set headers in ADF while calling an API using a Web Activity and use the output of the activity to get the token and refreshtoken.

To use the output of this web activity in a subsequent activity (copy or web activity), you can use :

{
  "foo": "bar",
  "some": "value"
}

@activity('Web1').output.foo

to get the value of foo.

Hope this helps.


这篇关于我们如何在使用ADF调用API \ Web服务时构造头文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆