I want to incorporate a basic HTTP protocol to allow syncing with a back-end database for the users of my iPad app. I don't intend to stream audio or video, I just want to access a server and do some low volume HTTP Gets and Puts. I don't see any IOS support for HTTP other than streaming.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Certainly you can use HTTP for XML, JSON services, etc. Look at NSURLConnection
http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html
回答2:
Direct quote form there website:
What is ASIHTTPRequest? ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that makes some of the more tedious aspects of communicating with web servers easier. It is written in Objective-C and works in both Mac OS X and iPhone applications.
It is suitable performing basic HTTP requests and interacting with REST-based services (GET / POST / PUT / DELETE). The included ASIFormDataRequest subclass makes it easy to submit POST data and files using multipart/form-data.