Forum Discussion

Mabutho_joe's avatar
Mabutho_joe
Frequent Visitor
6 years ago
Solved

Web.contents function with time out error

Hi There, 

 

I have a function that reads from Jira rest API that takes startAt and maxResults as arguments see below code in blue, problem is, if I add [Timeout=#duration(0,0,60,0)] it recognise this as a third argument and the function expect 2, without parameters code works very fine see code in pink, please help

(start as number, maxR as number) =>
let
Source = Json.Document(Web.Contents("https://aws-tools.standardbank.co.za/jira/rest/api/2/search?jql=issuetype%20in%20(epic,feature,spike,%27New%20Feature%27,%27Safe%20Feature%27,%27Vendor%20Story%27,%27Production%20Incident%27)%20and%20created%3E=%272020-01-01%27",[Query=[startAt=Number.ToText(start), maxResults=Number.ToText(maxR)]])),
issues = Source[issues]


in
issues

-------------------------------------------------------------------------------------------------------------------------------------------

let
Source = Json.Document(Web.Contents("https://aws-tools.standardbank.co.za/jira/rest/api/2/search?jql=issuetype%20in%20(epic,feature,spike,%27New%20Feature%27,%27Safe%20Feature%27,%27Vendor%20Story%27,%27Production%20Incident%27)%20and%20updated%3E=%272020-01-01%27&maxResults=10000", [Timeout=#duration(0,0,60,0)])),
issues = Source[issues],