title: POST application/x-www-form-urlencoded to Server with AFNetworking 2.0
body: <p>I'm trying to post data to a server which successfully connects, but does not take the data I'm passing through the parameter. The server is set to take <code>application/x-www-form-urlencoded</code>. I looked up some examples on here, but did not see a fix for it.</p>
  
  <p>My parameter looks like this:</p>
  
  <pre><code>parameter = @{@ "key1" : value1,
                  "key2" : value2};
  </code></pre>
  
  <p>and my method is this:</p>
  
  <pre><code>- (void)postDataToServer:(NSDictionary*)parameters{
  
      NSString *URLString = @"http://urlInfo";
      AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
  
      manager.responseSerializer = [AFHTTPResponseSerializer serializer];
      manager.requestSerializer = [AFHTTPRequestSerializer serializer];
      manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"application/x-www-form-urlencoded"];
  
      [manager POST:URLString
         parameters:parameters
            success:^(AFHTTPRequestOperation *operation, id responseObject)
          {
          NSLog(@"responseObject: %@", responseObject);
          NSLog(@"operation.responseString: %@",operation.responseString);
          NSLog(@"operation.response: %@",operation.response);
  
      }
            failure:
       ^(AFHTTPRequestOperation *operation, NSError *error) {
           NSLog(@"Error: %@", error);
           NSLog(@"Error Response --&gt; %@",operation.responseString);
       }];
  }
  </code></pre>
  
  <p>My responses from the success block are as follows:</p>
  
  <pre><code>responseObject: &lt;&gt;
  operation.responseString: 
  operation.response: &lt;NSHTTPURLResponse: 0x37cd60&gt; { URL: http://urlInfo } { status code: 200, headers {
      "Content-Length" = 0;
      Date = "Mon, 24 Nov 2014 03:06:22 GMT";
      Server = "Apache-Coyote/1.1";
  } }
  </code></pre>
  
  <p>Can someone please point out what is missing here? Thank you.</p>