Update service registration to match latest guidance (#32211)

pull/32212/head
Luke Latham 2024-04-01 08:30:48 -04:00 committed by GitHub
parent 96a7617776
commit e377ac0c30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -680,7 +680,7 @@ public class CookieHandler : DelegatingHandler
The `CookieHandler` is registered in the `Program` file:
```csharp
builder.Services.AddScoped<CookieHandler>();
builder.Services.AddTransient<CookieHandler>();
```
The message handler is added to any preconfigured <xref:System.Net.Http.HttpClient> that requires cookie authentication: