ios - How to send json data in the Http request using AFNetworking -
i have pass data json format server
{"email":"abc@gmail.com","password":"abc"}
and have used code data not pass server please me..
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.................."); }];
you can check link @ https://www.hurl.it/
1)give http link
2)select method type "get" or "post"
3)add parameters
and check response.if same response contact backend team.
Comments
Post a Comment