AFNetworking 2.0 : Cannot POST with JSON from IOS
Ever since upgrading my IOS code to use AFNetworking version 2.0 instead of 1.x, I cannot do an HTTP Post any more with JSON parameters. I suspect it is because my HTTP request header is not "application/json" but I have tried to do that and it still does not work. This is my test code for trying to POST by JSON: NSDictionary *parameters = [NSDictionary dictionaryWithObjectsAndKeys: email, @"email", password, @"password", nil]; [[OTApiClient sharedInstance] POST:@"login" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"result: %@", responseObject)