// // 1.设置请求路径
// NSURL *URL=[NSURL URLWithString:@"http://first.go.com/api/user/serves"];//不需要传递参数
//
// NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
//
// //设置POST请求
// request.HTTPMethod = @"POST";
// request.timeoutInterval = 60;
// //设置请求体
// //cinema_id=1533
// NSData *bodyData = [@"cinema_id=1533" dataUsingEncoding:NSUTF8StringEncoding];
// request.HTTPBody = bodyData;
//
// NSURLSession *session = [NSURLSession sharedSession];
// NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
//
// NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
// NSArray *arr = [[NSArray alloc]initWithArray:dic[@"results"][@"data"]];
// NSMutableArray *arrdict = [[NSMutableArray alloc]init];
// for (NSDictionary *dict in arr) {
// [arrdict addObject:dict];
// }
// NSLog(@"arrdict------%@",arrdict);
//
// //获取响应包
// //将response 转化为一个子类的HTTPURLResponse
// NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
// //打印状态码
// NSLog(@"状态码:%li", httpResponse.statusCode);
// //获取响应头
// NSDictionary *responseHeader = httpResponse.allHeaderFields;
// NSLog(@"响应头:%@", responseHeader);
//
//
// }];
// //开始网络任务
// [dataTask resume];