您的位置:首页 > 理论基础 > 计算机网络

【解决方案】Http请求报错

2016-01-11 19:44 302 查看
如题:

如果发起HTTP请求提示如下错误:

The resource could not be loaded because the App Transport Security policy requires the use ofa secure connection.

请修改配置信息:

1、在 Info.plist 中添加
NSAppTransportSecurity 类型设为 Dictionary

2、在 NSAppTransportSecurity 下添加 NSAllowsArbitraryLoads 类型设为
Boolean 值设为 YES

实例如图:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: