3

NSURLConnection 有一些缺失的功能(和一些小错误!),所以我一直在通过 CFNetwork 重新实现它。我的目标是直接替换 - 相同的输入,相同的输出。

一切都很好,除了......我找不到从 CFNetwork 错误代码映射的方法(http://developer.apple.com/library/ios/#documentation/Networking/Reference/CFNetworkErrors/Reference/reference.html)到 NSURLError 代码(https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/Reference/reference.html

注意:不要告诉我使用 ASIHttpRequest、AFNetworking 等 - 我喜欢它们,我经常使用它们,但是......对于这个特定的项目,除非 Apple 提供,否则不可能使用任何第三方代码。

4

0 回答 0