i have use this code but i don't know why we use POST and why we use GET in rest API?
-(IBAction)ClickSignUP:(id)sender
{
NSString *urlLoc = @"YOUR URL";
NSLog(@"%@",urlLoc);
NSString * requestString = [NSString stringWithFormat:@"Name=%@&Email=%@&Password=%@&MobileNumber=%@&BloodGroup=%@&DeviceID=%@&City=%@&DeviceType=I",txtName.text,txtEmail.text,txtPassword.text,txtMobileno.text,strBlood,strDeviceID,txtCity.text];
NSData *postData = [requestString dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *postLength = [NSString stringWithFormat:@"%lu",(unsigned long)[postData length]];
request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString:urlLoc]];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:postData];
PostConnectionSignUp = [[NSURLConnection alloc] initWithRequest:request delegate:self];
}
how we can integrate kingfisher image loading in swift 3.0
pod 'Kingfisher', '~> 4.6.1.0'
import Kingfisher
imgVUser.kf.setImage(with: URL(string: data.propertyImage), placeholder: UIImage.init(named: "placeholder"), options: [.transition(.fade(1))], progressBlock: nil, completionHandler: nil)
how we can integrate KRProgress Indicator in swift 3.0
pod 'KRProgressHUD', '~> 3.1.1.0'
DispatchQueue.main.async {
KRProgressHUD.show()
}
DispatchQueue.main.async {
KRProgressHUD.dismiss()
}