Skip to content

[BUG] Cannot access internal class AuthenticatedHttpClientHandler #999

Open
@wojciechrak

Description

@wojciechrak

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions