Forum Discussion
-jmdaher-
3 years agoRegular Visitor
Add a body to web.contents
Hello! I want to add a body to this code: let url = "https://pos.linisco.com.ar/sale_orders", Source = Json.Document(Web.Contents(url, [Headers = [#"Content-Type"="application/json", #"Accept"...
v-yalanwu-msft
Community Support
3 years agoHi, -jmdaher- ;
You could refer to Solution from here: https://eriksvensen.wordpress.com/2014/09/15/specifying-json-query-in-power-query-example-statistics...
let
content = "{
""from date"": ""1/1/2022"",
""to date"": ""12/11/2022"",
}",
Source = Json.Document(Web.Contents("https://api-sandbox.direct.yandex.com/json/v5/campaigns", [Headers=[Authorization="Bearer AQAAAAANlKwBAAQQn4Wfgbxxxxxxxxxx"], Content=Text.ToBinary(content)]))
in
Source
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
I receive an error:
DataSource.Error: Web.Contents with the Content option is only supported when connecting anonymously.