NSString *url = [NSString stringWithFormat:@"https://abck?keyword=%@",@"搜索"];
AFNetworking GET 请求URL包含中文 报错下图

需要对url 进行编号
url = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *url = [NSString stringWithFormat:@"https://abck?keyword=%@",@"搜索"];
url = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
本文标题:AFNetworking GET 请求URL包含中文
本文链接:https://www.haomeiwen.com/subject/cvgaeqtx.html
网友评论