I am trying to connect to an Api but it is using x-www-form-urlencoded ...and i am using this code .Plz tell me the correct method
AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
securityPolicy.allowInvalidCertificates = YES;
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer.acceptableContentTypes = nil;
manager.securityPolicy = securityPolicy;
[manager POST:[NSString stringWithFormat:@"@"%@%@phone=%@&password=%@",BASE_URL,API_LOGIN,phone,password]
parameters:nil
success:^(AFHTTPRequestOperation *operation, id responseObject) {
successBlock(responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Server Error : %@", operation.responseString);
errorBlock(error);
}];
}