[英]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.