Web services (specifically, RESTful web services) work with verbs. There are four main actions (or verbs) you generally use when data is involved: GET, POST, PUT, and DELETE.
In this recipe, we used POST, which is the verb that's conventionally used when an app asks the web server to insert a new piece of data.
This is why we had to instruct our mock web service to accept a POST at the /pizza address first – so that we could try sending some data to it and have it respond with a success message.
When working with web APIs, understanding exactly what data you are sending to the server may be a huge time saver.
One of the most commonly used tools for sending web requests is Postman, which you can find at https://www.postman.com/.
Postman can even work with requests from an emulator or simulator. Take a look at https://blog.postman.com/using-postman-proxy-to-capture-and-inspect-api-calls-from-ios-or-android-devices/ for more information.
One of the most commonly used tools for sending web requests is Postman, which you can find at https://www.postman.com/.
Postman can even work with requests from an emulator or simulator. Take a look at https://blog.postman.com/using-postman-proxy-to-capture-and-inspect-api-calls-from-ios-or-android-devices/ for more information.
After creating the POST...