在使用AFNetworking时,如果Url中包含空格,文字,或者特殊字符时,会崩溃:
[AFJSONRequestSerializer requestWithMethod:URLString:parameters:error:]
解决办法:
NSString *url = [NSString stringWithFormat:@"请求的链接"];
NSString *requestUrl = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];