I thought .net 4.8 supports http/2, but seems I am wrong. In my test program:
var requestMessage= new HttpRequestMessage(HttpMethod.Post, uri)
{
Content = new StringContent(body, Encoding.UTF8, "application/json"),
Headers = { Authorization = new AuthenticationHeaderValue("Bearer", token) },
Version = new System.Version(2,0)
};
var response = _httpClient.SendAsync(requestMessage).Result;
I got error: Only HTTP/1.0 and HTTP/1.1 version requests are currently supported.
Does it mean I still need to use the custom WinHttpHandler in .net 4.8?