我在ASIFormDataRequest中有setPostValue。像这样:
ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:url]];
[request setPostValue:@"helmi" forKey:@"username"];
[request setPostValue:@"123" forKey:@"password"];
[request setPostValue:@"goods" forKey:@"purchase"];
NSLog(@"...");
我想在发送到服务器之前显示发布值的NSLog。原因是因为我在post值中有很多变量值,需要检查我是否正确放置。
答案 0 :(得分:2)
ASIFormDataRequest
包含一个名为postData的变量NSMutableArray
。您可以使用
NSLog(@"%@", [request valueForKey@"postData"])