iOS开发Assertion failure in -[AFJSONRequestSerializer requestWithMethod:URLString:parameters:error:]

来源:互联网 发布:mac brew install 编辑:程序博客网 时间:2024/06/01 09:01

在使用AFNetworking 3.0 报错 Assertion failure in -[AFJSONRequestSerializer requestWithMethod:URLString:parameters:error:]


修改为

    NSString *URLStr = [NSString stringWithFormat:@"http://xxxxxxxxxx"];
    NSString *URL = [URLStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];  

即可


阅读全文
0 0
原创粉丝点击