AFNetWorking3.0中网络请求出错--[AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:]

原 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中网络请求出错--[AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:])