Learn how to implement the add functionality, which allows the user to insert a new dish to the database through the Nadia's Garden app.
- [Instructor] With our dishes now populated and being…displayed in the Nadia's Garden app,…our next task is to add a new dish.…The function to add a new dish is already implemented,…but it's empty.…The 'addNewDishViewControllerDidSave' function is called…from the 'addNewDishViewController.swift' file.…We don't really have to worry about connecting everything…because that part is already done.…What we still need to add the implementation where we can…send in the data and add a new dish.…
We will start by creating a request object, which is going…to have all the information needed to create a new dish.…The request object is going to take a URL and, in this case,…we are going to provide a new URL which points to the dish.…This URL is the same URL that we have implemented earlier…in our Nadia's Garden Web API.…And it can be found at local host 8090/dish.…
Once we have that, we are ready to add some header…information to our request.…We are going to use the 'addValue' method, passing in the…application 'json' as the content type for the header.…
- Reviewing the concepts behind server-side Swift programming
- Different server-side Swift frameworks
- Setting up a Kitura project
- Adding HeliumLogger for debugging
- Accessing JSON passed parameters using Kitura.
- Reading URL parameters and URL encoded form parameters
- Configuring the PostgreSQL database
- Fetching, inserting, and deleting records from the database
- Integrating a Kitura API with an iPhone app