Skip to content

Commit

Permalink
fix: Document InnerHandler null requirement for DI (#1569)
Browse files Browse the repository at this point in the history
* Addressing #1403

Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
  • Loading branch information
bbrandt and glennawatson authored Oct 1, 2023
1 parent dc07cfb commit b59977f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,9 @@ some interface `ITenantProvider` and has a data store `IAuthTokenStore` that can
{
this.tenantProvider = tenantProvider ?? throw new ArgumentNullException(nameof(tenantProvider));
this.authTokenStore = authTokenStore ?? throw new ArgumentNullException(nameof(authTokenStore));
InnerHandler = new HttpClientHandler();
// InnerHandler must be left as null when using DI, but must be assigned a value when
// using RestService.For<IMyApi>
// InnerHandler = new HttpClientHandler();
}

protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Expand Down

0 comments on commit b59977f

Please sign in to comment.