Forum Discussion
JackSoderstrom
Helper I
5 years agoM language how to get this header to work?
Trying to create a custom connector but can't with this header for some reason. Not sure how to use it correctly. This works just fine as a GET request shared Connector.Contents = () =>
...
- 5 years ago
That's not how POST works in Web.Contents()
Content: Specifying this value changes the web request from a GET to a POST, using the value of the option as the content of the POST.
lbendlin
Super User
5 years agopage_size 100 should do the trick.
JackSoderstrom
Helper I
5 years agoStill getting a 400 Bad request Error.
How should I format the dummy data?
let
AuthKey = Extension.CurrentCredential()[Key],
url = "https://api.notion.com/v1/databases/id/query",
body = "{""page_size : ""100""}", //How should I be formatting this
Source = Json.Document(Web.Contents(url,[
headers = [
#"Authorization" = Text.Combine({"Bearer ", AuthKey}),
#"Content-Type" = "application/json ; charset=utf-8",
#"Version" = "2021-08-16"
],
Content = Text.ToBinary(body)
]
))
in
Source;
- JackSoderstrom5 years ago
Helper I
Figured it out, Thanks for all the help you definitely pointed me in the right direction. I ended up making it empty "Content = Text.ToBinary("")]" should have tried that first!