0
HTTPS連接
我寫了一個短的iOS應用,通過接觸常用的服務器:重用在iOS
NSString *URLString = @"http://mysite/script.php?foo=1";
NSURL *getURL = [NSURL URLWithString:URLString];
NSURLRequest *getRequest = [NSURLRequest requestWithURL:getURL];
NSURLResponse *response = nil;
NSError *error = nil;
NSData *responseData = [NSURLConnection sendSynchronousRequest:getRequest returningResponse:&response error:&error];
這工作不錯,但我訪問的網站相對頻繁與foo
各種值,並且隨着我們計劃遷移到https
,人們提出了關於每次設置和拆除NSURLConnection
的電話開銷的問題。我看到this answer saying that the class handles caching,但對於https
也是如此?
我確定像使用afhttpclient – HalR 2013-04-23 05:12:00