requesting not working on windows 10 ONLY windows 11 works fine
This is a short snippet of my code, pretty simple, uses a api and whatever. But no url works at all so its not just this url its any and also any windows 10 pc i have tried spits out the same issue
private static async Task<List<Dictionary<string, object>>> GetPlayerDataAsync(List<int> ids)
{
string playersApi = "https://api.rec.net/api/players/v2/progression/bulk";
try
{
string queryString = string.Join("&", ids.Select(id => $"id={id}"));
string requestUrl = $"{playersApi}?{queryString}";
var request = new HttpRequestMessage
{
RequestUri = new Uri(requestUrl),
Method = HttpMethod.Get,
};
request.Headers.Add("Accept", "*/*");
HttpResponseMessage response = await client.SendAsync(request);
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
List<Dictionary<string, object>> data = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(responseContent);
return data;
}
else
{
Console.WriteLine($"Error retrieving player data: {response.StatusCode}");
return null;
}
}
catch (Exception e)
{
Console.WriteLine($"Request Error: {e.Message}");
return null;
}
} private static async Task<List<Dictionary<string, object>>> GetPlayerDataAsync(List<int> ids)
{
string playersApi = "https://api.rec.net/api/players/v2/progression/bulk";
try
{
string queryString = string.Join("&", ids.Select(id => $"id={id}"));
string requestUrl = $"{playersApi}?{queryString}";
var request = new HttpRequestMessage
{
RequestUri = new Uri(requestUrl),
Method = HttpMethod.Get,
};
request.Headers.Add("Accept", "*/*");
HttpResponseMessage response = await client.SendAsync(request);
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
List<Dictionary<string, object>> data = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(responseContent);
return data;
}
else
{
Console.WriteLine($"Error retrieving player data: {response.StatusCode}");
return null;
}
}
catch (Exception e)
{
Console.WriteLine($"Request Error: {e.Message}");
return null;
}
}