Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

14.6. POSTing to the web

Many web pages allow you to GET or POST information interchangeably. But in some situations, that’s not the case, and you’re instead forced to POST (and then to read back the response manually). In this section, we’ll look at both how to program a simple POST and how to do something more complex, like a form.

14.6.1. POSTing by hand

When you need to POST to the web, you have to fall back on some HTTP-related low-level commands that we haven’t yet discussed in depth, including NSMutableURLRequest (which allows you to build a piecemeal request) and NSURLConnection (which allows you to extract information from the web).


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint