title: Passing an JSON array to MVC Web API via GET
body: <p>I know there are tons of answers for this topic, but couldn't find the solution to my issue.
  I have an ASP.NET MVC Web API that looks like this:</p>
  
  <pre><code>    [HttpGet]
      public IList&lt;Country&gt; GetCountryList(List&lt;long&gt; idList)
  </code></pre>
  
  <p>And I've tried calling it like this:</p>
  
  <pre><code>    $.ajax({
          dataType: "json",
          data: JSON.stringify({idList: listOfIds}),            
          type: "GET",
          url: "api/v1/util/CountryList",
          success: function (result) {
              alert(result);
          }
      });
  </code></pre>
  
  <p>The URL then looks like this:</p>
  
  <pre><code>https://localhost/supertext/api/v1/util/CountryList?{%22idList%22:[46,14,62,83,120]}
  </code></pre>
  
  <p>Alternative:</p>
  
  <pre><code>    $.ajax({
          dataType: "json",
          data: {
              idList: JSON.stringify(listOfIds),
          }          
          type: "GET",
          url: "api/v1/util/CountryList",
          success: function (result) {
              alert(result);
          }
      });
  </code></pre>
  
  <p>URL:</p>
  
  <pre><code>https://localhost/supertext/api/v1/util/CountryList?idList=%5B46%2C14%2C62%2C83%2C120%5D
  </code></pre>
  
  <p>Both methods don't work.</p>
  
  <p>Do I really have to send and receive it as a string or use POST?</p>