ASI同步(AFN做不到的东西)

ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:url]];
        // 请求体
        [request addPostValue:rsaCode forKey:@"result"];
        [request addPostValue:@"" forKey:@"marks"];
        [request addPostValue:@"1.0" forKey:@"v"];
        NSData *image = UIImageJPEGRepresentation(img, 0.85f);
        NSLog(@"-----------------------------------------%lf", image.length / 1024.0);
        // 数据类型data
        [request addData:image withFileName:[NSString stringWithFormat:@"%@.png",[dic4 objectForKey:@"morelocationString"]] andContentType:@"image/jpeg" forKey:@"photo"];
        
        [request setCompletionBlock:^{
                                  
    
            }];
        [request setFailedBlock:^{
                         
            }


        }];
        [request startAsynchronous];

你可能感兴趣的:(ASI同步(AFN做不到的东西))