- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { NSLog(@"touchesBegan"); //创建参数字典 NSMutableDictionary *dict = @{@"username":@"zhangsan",@"password":@"zhang"}.mutableCopy; // 一句话发送 GET 请求. [[CZNetworkTool sharedNewtWorkTool] POSTRequestWithUrl:@"" paramaters:dict successBlock:^(id object, NSURLResponse *response) { NSLog(@"网络请求成功:%@",object); } FailBlock:^(NSError *error) { NSLog(@"网络请求失败"); }]; } 一句话发送POST请求
代码执行结果: