No se puede establecer el tipo de contenido en AFNetworking AFHTTPRequestOperationManager

Tengo un service web que requiere Content-Type = application / x-www-form-urlencoded. He configurado los encabezados pero no cambia como puedo ver en los loggings de requestes. A continuación se muestra el código y el logging de request

NSURL *baseURL = [NSURL URLWithString:@"http://example.net/api/"]; // Initialize Request Operation Manager AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:baseURL]; // Configure Request Operation Manager [manager setResponseSerializer:[AFJSONResponseSerializer serializer]]; manager.responseSerializer.acceptableContentTypes = [manager.responseSerializer.acceptableContentTypes setByAddingObject:@"application/x-www-form-urlencoded"]; // Send Request [manager GET:@"Account/Register" parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) { // Process Response Object NSLog(@"Register Response: %@",responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { // Handle Error NSLog(@"Register Response Error: %@",[error description]); }]; 

Pero cuando miro la request, Content-Type no se modifica. Aquí están los detalles de la request

  ErrorDomain=AFNetworkingErrorDomainCode=-1011"Request failed: bad request (400)"UserInfo=0x109559a40{ AFNetworkingOperationFailingURLResponseErrorKey=<NSHTTPURLResponse: 0x109709260>{ URL: http: //example.net/api/Account/Register }{ statuscode: 400, headers{ "Cache-Control"="no-cache"; "Content-Length"=142; "Content-Type"="application/json; charset=utf-8"; Date="Mon, 10 Mar 2014 14:30:52 GMT"; Expires="-1"; Pragma="no-cache";Server="Microsoft-IIS/8.0"; "Set-Cookie"="xxxxx;Path=/;Domain=example.net, WAWebSiteSID=xxxxxxx; Path=/; HttpOnly";"X-AspNet-Version"="4.0.30319";"X-Powenetworking-By"="ASP.NET"; } }, NSLocalizedDescription=Requestfailed: badrequest(400), NSErrorFailingURLKey=http: //example.net/api/Account/Register } 

¿Cómo puedo configurar Content-Type para la aplicación / x-www-form-urlencoded?

No necesita configurar ResponseSerializer para el administrador. Por favor, el siguiente código del usuario funcionará para usted.

  NSURL *baseURL = [NSURL URLWithString:@"http://example.net/api/"]; // Initialize Request Operation Manager AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:baseURL]; // Configure Request Operation Manager manager.responseSerializer.acceptableContentTypes = [manager.responseSerializer.acceptableContentTypes setByAddingObject:@"application/x-www-form-urlencoded"]; // Send Request [manager GET:@"Account/Register" parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) { // Process Response Object NSLog(@"Register Response: %@",responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { // Handle Error NSLog(@"Register Response Error: %@",[error description]); }];