Open
Description
Describe the bug
When trying to use authentication handler, AuthenticatedHttpClientHandler
like in the readme (ln 570), I get error
'AuthenticatedHttpClientHandler' is inaccessible due to its protection level
Steps To Reproduce (from readme.md)
class LoginViewModel
{
public async Task LoginAndCallApi()
{
var api = RestService.For<IMyRestService>(new HttpClient(new AuthenticatedHttpClientHandler(GetToken)) { BaseAddress = new Uri("https://the.end.point/") });
var location = await api.GetLocationOfRebelBase();
}
}
interface IMyRestService
{
[Get("/getPublicInfo")]
Task<Foobar> SomePublicMethod();
[Get("/secretStuff")]
[Headers("Authorization: Bearer")]
Task<Location> GetLocationOfRebelBase();
}
Expected behavior
AuthenticatedHttpClientHandler
class is public
Version
5.2.1