简体   繁体   English

在 Azure 逻辑应用程序中,如何在 http 请求中传递参数?

[英]In Azure Logic App, how do I pass parameters in a http request?

I am trying to download a file from a website that requires me to pass parameters while making the HTTP request.我正在尝试从要求我在发出 HTTP 请求时传递参数的网站下载文件。 The request is as follows请求如下

https:/wwww.xxx.com/download/exportdata.go?pid=3276439&startdate=2015-01-01&enddate=2015-01-02

Though when I hard code the request it works perfectly, but now that I want to download this file on a schedule, i need to be able to change the date for the startdate and enddate parameters?虽然当我对请求进行硬编码时它可以完美运行,但是现在我想按计划下载此文件,我需要能够更改 startdate 和 enddate 参数的日期吗?

I was trying to explore the expressions of utcnow and adddays, but not much success?我试图探索 utcnow 和 adddays 的表达方式,但没有多大成功? What do i need to do to pass these parameters?我需要做什么来传递这些参数?

To pass arguments you can use the "@{}" syntax, and use the builtin functions such as "utcnow, adddays, concat, base64, length, contains, int, string, float, addhours, rand, toLower, toUpper, etc".要传递参数,您可以使用“@{}”语法,并使用内置函数,例如“utcnow、adddays、concat、base64、length、contains、int、string、float、addhours、rand、toLower、toUpper 等” .

To add formatting to the date returned when using the @utcnow() function you can pass an optional argument to the call to use it as the formatting argument, something like:要在使用 @utcnow() 函数时为返回的日期添加格式,您可以将可选参数传递给调用以将其用作格式参数,例如:

http://api.example.org/weather?lat=35&lon=139&time=@{utcnow('yyyy-MM-dd')}

For more information on what that formatting string can look like you can use "C#" formatting as detailed in the following page: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings有关该格式字符串外观的更多信息,您可以使用“C#”格式,如下页所述: https : //docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date -和时间格式字符串

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Azure逻辑App中如何将Cookie传递给Http请求 - In azure logic App how to pass Cookie to Http request 如何在 Azure 逻辑应用中的步骤之间传递值? - How do I pass values between steps in an Azure Logic App? 如何在 Azure 逻辑应用程序中使用自定义 URL 作为 HTTP 请求? - How do you use Custom URL as HTTP Request in Azure Logic App? Azure逻辑应用程序HTTP请求500 - Azure Logic App HTTP request 500 将数据传递到Azure Logic应用程序请求触发器 - Pass data to Azure Logic App Request Trigger Azure 逻辑应用程序:如何将单个 For Each 变量传递到执行存储过程步骤? - Azure Logic App: How do I pass a single For Each variable to an Execute Stored Procedure step? Azure 逻辑应用自定义连接器 - SOAP 到 REST - 将 HTTP 标头从 REST 传递到 SOAP 请求 - Azure Logic App Custom Connector - SOAP to REST - Pass HTTP header from REST to SOAP request 如何在逻辑应用程序中使用 HTTP 请求中传递的值/动态分配值给逻辑应用程序参数 - How to use values passed in HTTP Request in Logic Apps / Assign Values to Logic App Parameters Dynamically 如何将枚举类型传递给Azure Logic应用程序? - How to pass enum types to Azure Logic app? 如何重复执行一次Azure Logic App操作50次? - How do I repeat an Azure Logic App Action 50 times?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM