Home > Mobile >  Fetching database content from notion
Fetching database content from notion

Time:01-30

According to the Notion API, to retrieve the contents of your database you need to perform a post request. I’m trying to build an app that fetches the content from a database I’ve created on Notion through its API and displayed it in a table view. How can I do this since it’s not a get request?

CodePudding user response:

If you already have the networking logic set up, all you have to do is add this line of code, (change "request" object name with whatever you named it):

 request.httpMethod = "POST"

Here is an example of how to do a post network call: https://www.appsdeveloperblog.com/http-post-request-example-in-swift/

  •  Tags:  
  • Related