解决方法:
声明请求的参数格式是json,
post的数据格式还是传字典。
声明代码:
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
附加说明:
//说明请求格式为json格式
manager.requestSerializer = [AFJSONRequestSerializer serializer];
//说明接收格式为json格式
manager.responseSerializer = [AFJSONResponseSerializer serializer];