Closed ItamarM closed 9 years ago
Should use NSURLSession (supported from iOS7).
[[[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { if (error) { [callback onNetworkError]; } else { int16_t httpCode = [(NSHTTPURLResponse*) response statusCode]; NSString * strData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; [callback onSuccess:httpCode data: strData]; } }] resume];
Great example overall. Keep up the good work :+1:
Thanks for letting me know! Do you mind putting up a PR?
Fixed with: https://github.com/libmx3/mx3/commit/78627c6c4d0e290ab6e3c9d44a85fdd117d50834
@skabbes Sorry I was OOO. Thanks for closing it :+1:
Should use NSURLSession (supported from iOS7).
Great example overall. Keep up the good work :+1: