Forum Discussion

k13's avatar
k13
Frequent Visitor
3 years ago
Solved

Dynamic Querying with Static URL and Headers

Gooday, I have a query that needs to be able to schedule refresh. 

The following query in desktop can manually refresh:

 

 

 

 

let
day = DateTime.LocalNow()
Source = Json.Document(Web.Contents("URL"&day, 
     [Headers=
     [Accept="application/json",
      Authorization="token"
]]))
in

#"Source"

 

 

 

 How can I get this to schedule refresh? 
I have seen other methods, but none of which also include headers. 

 

2 Replies

    • k13's avatar
      k13
      Frequent Visitor

      Yes, thank you!! This is the code I used to make this work from that link.

      let
      day = DateTime.LocalNow()
      Source = Json.Document(Web.Contents("URL"&day, 
           [RelativePath = day,
           Headers = 
           [Accept="application/json",
            Authorization="token"
      ]]))
      in
      
      #"Source"