title: Pass an array of integers to ASP.NET Web API?
body: <p>I have an ASP.NET Web API (version 4) REST service where I need to pass an array of integers.</p>
  
  <p>Here is my action method:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public IEnumerable&lt;Category&gt; GetCategories(int[] categoryIds){
  // code to retrieve categories from database
  }
  </code></pre>
  
  <p>And this is the URL that I have tried:</p>
  
  <pre class="lang-none prettyprint-override"><code>/Categories?categoryids=1,2,3,4
  </code></pre>