*** NSURLConnection -> NSURLSession
https://qiita.com/akitaika_/items/2f4fca20a82cb6895329
*** NSURLResponse.expectedContentLength == -1
[request setValue:@"identity" forHTTPHeaderField:@"Accept-Encoding"];
https://stackoverflow.com/questions/23834151/nsurlconnection-expectedcontentlength-returns-1
*** NSURLConnection sendSynchronousRequest
NSURLSession *session = [NSURLSession sharedSession];
[[session dataTaskWithURL:[NSURL URLWithString:londonWeatherUrl]
completionHandler:^(NSData *data,
NSURLResponse *response,
NSError *error) {
// handle response
}] resume];
https://stackoverflow.com/questions/32643207/ios9-sendsynchronousrequest-deprecated
*** NSURLConnection(procedure method) -> NSURLSession (Blocked method)
https://tennmemo.blogspot.com/2018/11/objc-method-wait-block-finish.html
댓글
댓글 쓰기