title: AngularJs $http.get: Sending array of objects as params
body: <p>I am having issues with finding the correct way to send an array of objects to my API using AngularJS.</p>
  
  <p>FrontEnd Code</p>
  
  <pre><code>     function getPrices(articles) {
              return $http.get('http://someurl/api/prices/getprices', { params: { articles: articles } }).then(function (res) {
                     // do something with prices
                  }, function (err) {
                      // handle error
                  });
        }
  </code></pre>
  
  <p>Articles are of the type</p>
  
  <pre><code>var oneArticle = {
    code: 'someCode',
    quantity: 1,
    stockUnit: 'piece'
  }
  </code></pre>
  
  <p>Api code</p>
  
  <pre><code>[VersionedRoute("getprices")]
  [HttpGet]
  public IHttpActionResult GetPrices([FromUri]List&lt;Article&gt; articles) {
   // do something with input
  }
  </code></pre>
  
  <p>Article class</p>
  
  <pre><code>public class Article {
    public string Code {get;set;}
    public int Quantity {get;set;}
    public string StockUnit {get;set;}
  }
  </code></pre>
  
  <p>Some questions:</p>
  
  <p>1) Why do I not receive any data on my API. Articles is always null</p>
  
  <p>2) Is this the right approach? </p>
  
  <p>Thanks</p>
  
  <p><strong>EDIT 1:</strong> 
  Using a post option I receive following data in my request but I still don't know how to handle it on the API. </p>
  
  <p><a href="https://i.stack.imgur.com/pJ7rA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pJ7rA.png" alt="enter image description here"></a></p>