Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
sa34techer
Helper I
Helper I

Adding timeout in WEB.CONTENTS to right place?

Where is the right place to add a Time Out Increase in this connection string?  The Bear Token is a parameter

 

= Json.Document(Web.Contents("https://surveys-api.avius.com/api/v1/survey/133f8356-eb51-5968-b2b6-bf200d505401/changes/117028961/5...",[Timeout=#duration(0, 0, 30, 0)], [Headers=[Authorization=#"Bearer Token", Accept="text/plain"]]))

 

 timeout.png

1 ACCEPTED SOLUTION

I figured it out. I had to remove the bracket in front of Headers. It is working now.

 

= Json.Document(Web.Contents("https://surveys-api.avius.com/api/v1/survey/133f8356-eb51-5968-b2b6-bf200d505401/Changes/0/5000",[Timeout=#duration(0, 1, 0, 0), Headers=[Authorization=#"BearerToken", Accept="text/plain"]]))

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

= Json.Document(Web.Contents("https://surveys-api.avius.com/api/v1/survey/133f8356-eb51-5968-b2b6-bf200d505401/changes/117028961/5...",[Timeout=#duration(0, 0, 30, 0), [Headers=[Authorization=#"Bearer Token", Accept="text/plain"]]]))

Web.Contents - PowerQuery M | Microsoft Learn

Hello Sir, the code you sent gives out a Expression.SyntaxError: Invalid identifier error.   Please look into it and reply with the updated m code.

 

1.png

I figured it out. I had to remove the bracket in front of Headers. It is working now.

 

= Json.Document(Web.Contents("https://surveys-api.avius.com/api/v1/survey/133f8356-eb51-5968-b2b6-bf200d505401/Changes/0/5000",[Timeout=#duration(0, 1, 0, 0), Headers=[Authorization=#"BearerToken", Accept="text/plain"]]))

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.