'UTF8' is not a supported encoding name
<p>So I'm just playing around with Spotify's Web API and I'm trying to access my top played tracks. Although I've encountered a problem I've been trying to solve for a couple of hours now but I can't find an answer. </p>

<p>When I try to deserialize my response, I get the follwing error:</p>

<blockquote>
  <p>'UTF8' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
  Parameter name: name
  The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set.</p>
</blockquote>

<p>The ContentType is <code>application/json; charset=UTF8</code></p>

<p>Any ideas?</p>

<p>Here's my request code:</p>

<pre><code>private static HttpClient GetHttpClient()
{
    HttpClientHandler handler = new HttpClientHandler() {
        AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate
    };
    var httpClient = new HttpClient(handler);
    httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
    return httpClient;
}

public async Task&lt;SearchArtistResponse&gt; GetSelfTopAsync(string type, string userName)
{
    var httpClient = GetHttpClient();
    httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", GetAccessToken(userName));

    var sb = new StringBuilder();
    sb.Append(ApiUrl);
    sb.Append($"/me/top/{type}");
    var query = sb.ToString();
    var response = await httpClient.GetAsync(query);

    var spotifyResponse = JsonConvert.DeserializeObject&lt;SearchArtistResponse&gt;(await response.Content.ReadAsStringAsync());
    return spotifyResponse;
}
</code></pre>