AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.requestSerializer = [AFHTTPRequestSerializer serializer]; //not working with or without this.
NSDictionary *parameters = [NSDictionary dictionaryWithObjectsAndKeys:@"id", @"id", @"pwd", @"pwd", @"func", @"func", nil];
[manager POST:@"http://someurl.com/abc/func.php" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"Success: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
なぜ私は得ているのですか
エラー Domain=AFNetworkingErrorDomain Code=-1016 "Request failed: unacceptable content-type: text/html" UserInfo=0x1f89e740 {NSErrorFailingURLKey= http://someurl.com/abc/func.php , AFNetworkingOperationFailingURLResponseErrorKey=, NSLocalizedDescription=Request failed: unacceptableコンテンツタイプ: text/html}