Try and use this:
- (IBAction)sendPostData:(id)sender {
NSString *post=[NSString stringWithFormat:@"&DeviceId=mac123&DeviceType=ios&Phone=%@",phoneNumberTxt.text];
NSData *postData=[post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
NSString *postLength =[NSString stringWithFormat:@"%lu",(unsigned long)[postData length]];
NSMutableURLRequest *request=[[NSMutableURLRequest alloc]init];
[request setURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://192.168.1.27:8080/MeetingPoint/api/Register"]]];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Current-Type"];
[request setHTTPBody:postData];
NSURLConnection *connection=[[NSURLConnection alloc]initWithRequest:request delegate:self];
NSMutableData *mydata=[[NSMutableData alloc]init];
mydata=[NSMutableData data];
NSLog(@"data is :%@",mydata);
[connection start];
}
Thanks.