Currently the default HTTP version for HttpClient
is 1.1
In both examples you are using version 1.1
.
The resource you are trying to fetch has response version of HTTP 2.0, try sending the request with
var request = new HttpRequestMessage(HttpMethod.Get, "http://131.189.89.86:11920/SetupWizard.aspx/yNMgLvRtUj")
{
Version = new Version(2, 0) // change the version
};
HttpResponseMessage response = await client.SendAsync(request);
Here is the place where the exception occurs: