AFNetworking打印错误信息

来源:互联网 发布:淘宝上架宝贝教程2017 编辑:程序博客网 时间:2024/06/15 20:08

<span style="font-size:14px;">NSError *underError = error.userInfo[@"NSUnderlyingError"];        NSData *responseData = underError.userInfo[@"com.alamofire.serialization.response.error.data"];        NSString *result = [[NSString alloc] initWithData:responseData  encoding:NSUTF8StringEncoding];        NSLog(@"%@",result);</span>

原文地址:帅气的链接


今天请求数据一直没成功,打印一看

<span style="font-size:14px;"><!DOCTYPE html><html><head><title>Apache Tomcat/9.0.0.M9 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 404 - /smart/device/select</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>/smart/device/select</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><hr class="line"><h3>Apache Tomcat/9.0.0.M9</h3></body></html></span>
HTTP Status 404,看见这个请直接去后台哪里搞事情!!!!!

1 0
原创粉丝点击