You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing on .NET Core 2.1 (by setting Target Framework 2.1), the following code results in a 403 Forbidden since the header is not set correctly.
Header is set using the following method:
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Token", "9ac..b87b20");
var result = client.GetStringAsync("/api/ipam/prefixes/").Result;
Moving back to .NET Core 2.0 (by setting Target Framework 2.0) fixes the issue. The same happens when using RestSharp. Seems there is some bug with HttpClient and setting authorization headers.
Testing through: Vs Professional 2017 (15.7.3) on Windows 10 with the latest updates.
The text was updated successfully, but these errors were encountered:
Testing on .NET Core 2.1 (by setting Target Framework 2.1), the following code results in a 403 Forbidden since the header is not set correctly.
Header is set using the following method:
Moving back to .NET Core 2.0 (by setting Target Framework 2.0) fixes the issue. The same happens when using RestSharp. Seems there is some bug with HttpClient and setting authorization headers.
Testing through: Vs Professional 2017 (15.7.3) on Windows 10 with the latest updates.
The text was updated successfully, but these errors were encountered: