I am developing one app,in that i have used to send my contact numbers to the server through WebServices.Here i get the my contact numbers an array,and i send the contact array through webservices.Here below code,
NSString *myRequestString1 = [[NSString alloc] initWithFormat:@"contact_numbers=%@",MobiileArray ];
NSData *myRequestData = [ NSData dataWithBytes: [ myRequestString1 UTF8String ] length: [ myRequestString1 length ] ];
NSMutableURLRequest *request = [ [ NSMutableURLRequest alloc ] initWithURL: [ NSURL URLWithString:@"http://myproject.in/myproject-contacts.php"]];
[request setHTTPMethod: @"POST"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"];
[request setHTTPBody: myRequestData];
NSURLResponse *response;
NSError *err;
NSData *returnData = [NSURLConnection sendSynchronousRequest: request returningResponse:&response error:&err];
NSError* error;
NSMutableArray* result = [NSJSONSerialization JSONObjectWithData:returnData
options:kNilOptions
error:&error];
NSLog(@"result: %@", result);
but the response is null ,any mistakes on my code? can you please suggest me Thank you.