title: Get data from WebApi in c#
body: <p>I have webapi and her method:</p>
  
  <pre><code>[HttpPost, HttpGet]
  [ActionName("GetData")]
  public MyData GetData([FromUri] MyData data)
  {
    return datamanager.get(data);
  }
  </code></pre>
  
  <p>How do I invoke this method? I.e. how do I send <code>data</code> parameter through query part of URL?</p>
  
  <p>To invoke get method which takes no parameters I use following code:</p>
  
  <pre><code>public static async Task&lt;myClassl&gt; GetData()
  {
      HttpClient client = new HttpClient();
      client.BaseAddress = new Uri("http://sasa.com");
      HttpResponseMessage response = await client.GetAsync("api/GetData");
      myClassl data = await response.Content.ReadAsAsync&lt;myClassl&gt;();
  
      return data ;
  }
  </code></pre>
  
  <p>Thanks.</p>