title: How to send a list of integers to web api 2 get request?
body: <p>I am trying to accomplish this task in which I need to send a list of id's (integers) to a web api 2 get request.</p>
  
  <p>So I've found some samples <a href="https://damienbod.com/2014/08/22/web-api-2-exploring-parameter-binding/" rel="noreferrer">here</a> and it even has a sample project, but it doesn't work...</p>
  
  <p>Here is my web api method code:</p>
  
  <pre><code>[HttpGet]
  [Route("api/NewHotelData/{ids}")]
  public HttpResponseMessage Get([FromUri] List&lt;int&gt; ids)
  {
      // ids.Count is 0
      // ids is empty...
  }
  </code></pre>
  
  <p>and here is the URL which I test in fiddler:</p>
  
  <pre><code>http://192.168.9.43/api/NewHotelData/?ids=1,2,3,4
  </code></pre>
  
  <p>But the list is always empty and none of the id's are passing through to the method.</p>
  
  <p>can't seem to understand if the problem is in the method, in the URL or in both...</p>
  
  <p>So how this is possible to accomplish ?</p>