我必须将json格式的数据传递给服务器
{"电子邮件":"abc@gmail.com","密码":"abc"}
我已经使用了这段代码,但数据没有传递到服务器,请帮助我..
NSDictionary *dict1=@{@"email": @"biren123@gmail.com"};
NSDictionary *dict2=@{@"password": @"biren"};
services *srv=[[services alloc]init];
NSString *str=@"http://emailsending.in/setting_saver_api/";
NSString *method=@"login.php";
NSMutableDictionary *dict=[[NSMutableDictionary alloc]init];
[dict setValue:dict1 forKey:@"email"];
[dict setValue:dict2 forKey:@"password"];
[srv postToURL:str withMethod:method andParams:dict completion:^(BOOL success, NSDictionary *responseObj)
{
NSLog(@"res :%@",responseObj);
NSLog(@"%d",success);
NSLog(@"Successfully..................");
}];