My code is here:</p>
AFHTTPRequestOperationManager *managers = [AFHTTPRequestOperationManager manager];
NSMutableDictionary *parDic = [NSMutableDictionary dictionary];
[parDic setObject:@"admin" forKey:@"userId"];
[parDic setObject:@"1" forKey:@"password"];
[managers POST:@"http://posttestserver.com/post.php?" parameters:par success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"JSON: %@", responseObject);
NSLog(@"sucess");
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
It print that:<code>Error: Error Domain=AFNetworkingErrorDomain Code=-1016 "Request failed: unacceptable content-type: text/plain"
But when I use kitchen test this request, it works fine.Why?Please help me, thank you very much!