AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
// AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc]initWithBaseURL:@"http://www.baidu.com"];
manager.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];//不设置会报-1016或者会有编码问题
manager.requestSerializer = [AFHTTPRequestSerializer serializer]; //不设置会报-1016或者会有编码问题
manager.responseSerializer = [AFHTTPResponseSerializer serializer]; //不设置会报 error 3840
[manager.responseSerializer setAcceptableContentTypes:[NSSet setWithObjects:@"application/json",@"text/json", @"text/javascript",@"text/html",@"text/plain",nil]]; //设置请求后返回的类型
NSDictionary *param = @{@"opact":@"user/getUI",@"uid":@"324426"};
[manager POST:@"http://192.168.1.174" parameters:param progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary * dic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
NSLog(@"%@",dic);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"%@",error);
}];