title: AngularJS $http get to ASP.NET Web Api with object in parameters
body: <p>I'm trying to get filtered data from server using a filtering object I pass to the server side. I have managed to get this working with a post:</p>
  
  <p>angular:</p>
  
  <pre><code>var filter: { includeDeleted: true, foo: bar };
  $http({ method: 'post', url: 'api/stuff', data: filter });
  </code></pre>
  
  <p>web api:</p>
  
  <pre><code>public IEnumerable&lt;StuffResponse&gt; Post([FromBody]Filter filter)
  {
      return GetData(filter);
  }
  </code></pre>
  
  <p>But i don't want to use a post for this, I want to use a get. But this does not work:</p>
  
  <p>angular</p>
  
  <pre><code>$http({ method: 'get', url: 'api/stuff', params: filter });
  </code></pre>
  
  <p>web api</p>
  
  <pre><code>public IEnumerable&lt;StuffResponse&gt; Get([FromUri]Filter filter)
  {
      return GetData(filter);
  }
  </code></pre>
  
  <p>Also tried specifying params: { filter: filter }.
  If i try [FromBody] or nothing, filter is null. With the FromUri i get an object at least - but with no data.  Any ideas how to solve this, without creating input parameters for all filter properties?</p>