title: Pass list of strings from client to web api
body: <p>The client application accesses a web api controller to get a set of data , the controller has a list as parameter. </p>
  
  <pre><code>static void Main(string[] args)
  {
  
      Program p = new Program();
      p.getdata().Wait();
  }
  
  
  public async Task getdata()
  {
      List&lt;string&gt; datelist = new List&lt;string&gt;();
      datelist.Add("12/05/2017");
      datelist.Add("14/05/2017");
      datelist.Add("18/05/2017");
  
      HttpClient host = new HttpClient();
      host.BaseAddress = new Uri("http://localhost/widgetApi/");
      host.DefaultRequestHeaders.Clear();
      host.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
      StringContent content = new StringContent(JsonConvert.SerializeObject(datelist), Encoding.UTF8, "application/json");
  
  
  
      HttpResponseMessage response = await host.GetAsync("api/dataAccessApi?"+ datelist);
      response.EnsureSuccessStatusCode();
     if( response.IsSuccessStatusCode)
      {
  
          Console.Read();
      }
  }
  </code></pre>
  
  <p>The controller is</p>
  
  <pre><code>public HttpResponseMessage Get([FromBody] List&lt;string&gt; dates)
  {
     ..... function going here
  }
  </code></pre>
  
  <p>My question is how can I pass  <strong>datelist</strong>  to the web api ??</p>