gpt4 book ai didi

cocoa - 如何使用安全 URL 将内容下载到 NSData 中?

转载 作者:行者123 更新时间:2023-12-03 17:37:03 26 4
gpt4 key购买 nike

我从以下片段开始下载图像

NSError *error = nil;
NSString *url = @"https://...";
[NSData dataWithContentsOfURL:[NSURL urlWithString:url] options:nil error:&error];

当此代码运行时,错误实例包含一个错误,但 userInfo 中没有大量信息。这只是尝试的安全 URL。

根据结果,我非常确定这些方法不能处理安全 URL。

我的问题:

Is there an easy way (like these methods, or some option) to set the dataWithContentsOfURL: method to download over a secure url?

最佳答案

尝试通过 this 运行您的 URL首先

关于cocoa - 如何使用安全 URL 将内容下载到 NSData 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1973126/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com