Xcode7 使用NSURLSession发送HTTP请求报错

控制台打印:Application Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app‘s Info.plist file.

解决办法:在info.plist中添加
<key>NSAppTransportSecurity</key><dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/></dict>

结果如图

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-08-09 13:12:33

Xcode7 使用NSURLSession发送HTTP请求报错的相关文章

Xcode7 使用NSURLSession发送HTTP请求报错[转]

控制台打印:Application Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file. 解决办法:修改info.plist文件

Xcode7.3 使用NSURLSession发送HTTP请求报错

控制台打印:Application Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file. 解决办法:修改info.plist文件

Xcode7 使用NSurl发送HTTP请求报错

Xcode 控制台打印 : App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file. 解决方法:在Info.plist中修改添加

Xcode7 使用NSURLSession发送HTTP请求的问题

错误描述: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file. 在iOS9 中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据. 解决方法: 在info.plist 加入key <

swift--Xcode7 使用Alamofire框架发送HTTP请求报错

控制台打印的错误信息: Application Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file. //这是ios 9更新后,苹果将http请求换为了https请求了,解决方案如下: <key>NSAppTranspor

JS请求报错:Unexpected token T in JSON at position 0

<?php /* 最近做一个ajax validate表单验证提交的代码,在ajax提交的时候 JS请求报错:Unexpected token T in JSON at position 0 描述: 这是一个请求,参数的地方报这要的错,请问是为什么? 百思不得其解啊 解决方案1: 去看下json的格式要求,JSON.parse()方法对json串要求很严格 解决方案2: http://www.bejson.com/ 用这个网址测试试试json格式是不是有误,换行,单引号什么的会导致报错,格式要求

android发送get请求时报错

异常信息: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.synology.synologycloud/com.synology.synologycloud.MainActivity}: android.os.NetworkOnMainThreadException 第一次看到这异常,字面意思是说:在主线程中的网络异常.然后我就去了解了下这个异常,先看看官方的说明 public class Netwo

firefox同步ajax请求报错的问题 A parameter or an operation is not supported by the underlying object

今天在测试系统时,一个很正常的功能在firefox下报错,经过验证在ie和chrome浏览器中功能这个正常.   调试后发现: 请求比其他请求的特殊点在于同步请求.   经过firefox的控制台上测试发现错误日志:   "[Exception... "A parameter or an operation is not supported by the underlying object" code: "15" nsresult: "0x805

nuget包管理nuget服务器发布包时出现请求报错 406 (Not Acceptable)

在window服务器上部署nuget服务器时,发布包时出现请求报错 406 (Not Acceptable) 验证用户名.密码正确的情况下,还是出现上面错误.后面跟踪服务器日志,发现window\temp文件超过65535,删除过期临时文件后即可 原文地址:https://www.cnblogs.com/94cool/p/10749129.html