美文网首页
AFNetWorking3.0中网络请求出错--[AFHTTPR

AFNetWorking3.0中网络请求出错--[AFHTTPR

作者: goodthing | 来源:发表于2017-01-03 18:17 被阅读33次

原 URL 类似如下

NSString *url = @"http://59.110.20.12/tomcat/yichengxunbao-api/smokeInformation/insertInfo?region=湖南省湘潭市雨湖区&street=天呐&phone=55&type=2&propertyPhone=55&nickName=看来&number=566&uid=1115091353149441093";

报错:

*** Assertion failure in -[AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:]

解决方式:  对上述的 url 做如下处理:

NSString *str1 = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];

相关文章

网友评论

      本文标题:AFNetWorking3.0中网络请求出错--[AFHTTPR

      本文链接:https://www.haomeiwen.com/subject/kqenvttx.html