title: POST a List<T> to MVC Controller always null
body: <p>I'm trying to Post a List to my MVC Controller..</p>
  
  <p><strong>The Controller:</strong>    <code>// POST api/UserFollows</code></p>
  
  <pre><code>public HttpResponseMessage PostUserFollows(List&lt;FollowItem&gt; followItemList)
  {
     //I'M GETTING NULL IN followItemList
     if(followItemList==null)
     {
        return Request.CreateResponse(HttpStatusCode.BadRequest);
     }
  }
  </code></pre>
  
  <p><strong>OUTPUT:</strong></p>
  
  <pre><code>STATUS 400 Bad Request &lt;-- Means I got null in followItemList
  TIME 4025 ms
  Cache-Control →no-cache
  Connection →Close
  Content-Length →0
  Date →Tue, 29 Jan 2013 09:38:31 GMT
  Expires →-1
  Pragma →no-cache
  Server →ASP.NET Development Server/10.0.0.0
  X-AspNet-Version →4.0.30319
  </code></pre>
  
  <p><strong>The <code>FollowItem</code> class</strong></p>
  
  <pre><code>namespace Helpers.SubClasses
  {
      public class FollowItem
      {
          public bool action;
          public long FollowsUserId;
      }
  }
  </code></pre>
  
  <p>I tried a lot of request but none of them works.. I always get null!</p>
  
  <p><strong>THE POST METHOD:</strong></p>
  
  <pre><code>function postFollowList() {
              $.ajax( {
              url: Request_Url + "api/UserFollows",
              type: 'post',
              data: {
                      {action: true, FollowsUserId: 123456777},
                      {action: true, FollowsUserId: 123456888}
              },
              dataType: 'json',
              success: function( data )
              {
                  $('#newmovie').html("OK");
              },
              error: function (jqXHR, textStatus, err) 
              {
                  $('#newmovie').html('Error: ' + err);
              }
               });
  </code></pre>
  
  <p><strong>The requests:</strong> //As JSON - I'm Using <a href="https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm" rel="nofollow noreferrer">POSTMAN</a> </p>
  
  <pre><code>1.
      [
          {"action":"true","FollowsUserId":"123456777"}
      ]
  2.
      [
          {action: true, FollowsUserId: 123456777},
          {action: true, FollowsUserId: 123456888}
      ]
  3.
      {[
          {action: true, FollowsUserId: 123456777},
          {action: true, FollowsUserId: 123456888}
      ]}
  4.
      {followItemList:[
          {action: true, FollowsUserId: 123456777},
          {action: true, FollowsUserId: 123456888}
      ]}
  </code></pre>
  
  <p><strong>Example for null:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/AIm0k.png" alt="Example"></p>
  
  <p><strong>I tried a lot more..
  Can anybody please help me with this?
  Thanks!!!</strong></p>
  
  <p><strong>EDIT:</strong>
  The answer was that I sent <code>application/xml</code> in the content-type when I needed to send <code>application/json</code>.</p>