我想构建我的NSMutableDictionary发送到使用AFNetworking框架的请求,但似乎我很困惑如何正确地做到这一点。AFNetworking - NSMutableDictionary参数
这里是服务器的期待
{
"do":"timeline",
"what":"posting",
"session":"",
"data":{
"status_timeline":"",
"with_timeline":"",
"location_timeline":"",
"category_timeline":"",
"privacy_timeline":""
}
,我已经试过这样
NSMutableDictionary *dict = [[NSMutableDictionary alloc]init];
[dict setValue:@"timeline" forKey:@"do"];
[dict setValue:@"posting" forKey:@"what"];
[dict setValue:session forKey:@"session"];
NSLog(@"Session %@", [dict valueForKey:@"session"]);
我希望有人能帮助我感谢的
欢迎来到SO。这是你的第二个问题,“我该怎么做xyz”。这不是教程网站,您需要指定您的问题,到目前为止所尝试的内容,获得的结果,遇到的错误以及期望的内容,以及针对您需要的特定问题的特定问题解决。请在通过http://stackoverflow.com/help/how-to-ask阅读更多问题以避免出现标志。有多个线程与您试图实现,例如:http://stackoverflow.com/questions/34434728/how-to-post-json-parameters-using-afnetworking – 2017-02-17 03:43:47