title: .NET Core 2.1 Consuming REST API doesn't return results
body: <p>This is how I am currently trying to consume a REST API</p>
  
  <pre><code>private HttpClient client = new HttpClient();
  public HomeController(IAuthenticationClient authenticationClient)
  {
      client.DefaultRequestHeaders.Accept.Clear();
      client.BaseAddress = new Uri("http://localhost:55260/api/Accounts/");
      client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
      this.authenticationClient = authenticationClient;
  }
  
  public IActionResult Index()
  {
      var result = GetList();
      return View();
  }
  
  public async Task&lt;List&lt;string&gt;&gt; GetList()
  {
      HttpResponseMessage response = await client.GetAsync("GetList");
      if (response.IsSuccessStatusCode)
      {
          return await response.Content.ReadAsAsync&lt;List&lt;string&gt;&gt;();
      }
      return new List&lt;string&gt;();
  }
  </code></pre>
  
  <p>This is the API that is being called:</p>
  
  <pre><code>[HttpGet]
  [Route("GetList")]
  [AllowAnonymous]
  public ActionResult&lt;IEnumerable&lt;string&gt;&gt; GetList()
  {
      return new string[] { "value1", "value2" };
  }
  </code></pre>
  
  <p>The issue is that if I test it on Postman, I get the correct result which is value1 and value2, however, when I call it from my api client, I get this weird result instead of the correct ones.</p>
  
  <p><a href="https://i.stack.imgur.com/RUQ8E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RUQ8E.png" alt="enter image description here"></a></p>
  
  <p>I have already tried so many different guides but non of them seem to work. Is there a library to handle REST apis for .net core 2.1? Or am I better off just using the httpclient?</p>