How to do HTTP POST to Google Form from iOS App
This is by far the simplest step of all. We will be using the open source iOS library AFNetworking for doing the actual POST.
- We first need to build a dictionary of all the POST parameters we want to submit to Google Forms using the identifiers extracted in the previous post
- Then we need to set proper request and response serializers
- We need to set the content type as "text/html". Thats because Google Form will return HTML response
- And finally we need to make the actual POST call. AFNetwork accepts success and failure callbacks will will be called depending on whether the call succeeded or failed.
Thats all folks. We have concluded our three part series of how to write to Google Sheet from an iOS App!