只写了个url就会报上面的错误,加一句话如下:
NSString*str1 = [uploadUrlstringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSetURLQueryAllowedCharacterSet]];
OK 搞定!!!!!
AFHTTPSessionManager * manager = [AFHTTPSessionManager manager];
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
[manager GET:str1 parameters:nil progress:^(NSProgress * _Nonnull downloadProgress) {
}success:^(NSURLSessionDataTask*_Nonnulltask,id_NullableresponseObject) {
NSLog(@"上传成功");
}failure:^(NSURLSessionDataTask*_Nullabletask,NSError*_Nonnullerror) {
NSLog(@"上传失败");
}];