The IHttpClientFactory creates a separate DI scope for each handler. Handlers can depend upon services of any scope. Services that handlers depend upon are disposed when the handler is disposed.
This statement should be more visible (like a NOTE in yellow in bold). We should also show examples of how scoped services resolved. Show the same scoped service being resolve in an HttpMessageHandler and the request with difference lifetimes. That's bitten some people.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@serpent5 let me know if you're interested in working on this.
@Rick-Anderson Yeah, sure. I'll investigate the specifics and submit something. Do you want me to prioritise this one over the others I've got on my list? I see it's a P0.
@davidfowl requests have the highest priority, much higher that P0 :ghost: :sunglasses: :fire:
Most helpful comment
@davidfowlrequests have the highest priority, much higher that P0 :ghost: :sunglasses: :fire: