下面是代码。我在官方提供的HBuilder-Integrate 中加入了AFNetworking,但是,请求以后都没有进入success和failure。都不知道请求是否成功。大家有遇到过么?
AFHTTPSessionManager manager = [AFHTTPSessionManager manager];
NSDictionary paramDict = @{
@"userId":@"b3698d33-e98f-4735-bd09-3762f18fc481",
@"meanHeartRate":@"12",
@"startTime":@"2018-06-06 09:38:55",
@"monitoringTime":@"20",
@"fetalMove":@"1",
@"heartRecord":@"[[120,100,12]]"
};
[manager POST:@"https://yl.atersoft.com:8080/yangle/yFetalMovement/yfetalmovement/saveFetalHeart" parameters:paramDict progress:nil success:^(NSURLSessionDataTask _Nonnull task, id _Nullable responseObject) {
NSLog(@"%@---%@",@"12",@"12");
} failure:^(NSURLSessionDataTask _Nullable task, NSError * _Nonnull error) {
NSLog(@"请求失败--%@",error);
}];
0 个回复