Changed order in pipeline so SetHandlerLifetime() is first, right on the on the IHttpClientBuilder that is returned when creating the Typed Client.
This commit is contained in:
parent
1fa6242c1c
commit
6127457e8e
@ -187,8 +187,8 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
||||
|
||||
//add http client services
|
||||
services.AddHttpClient<IBasketService, BasketService>()
|
||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||
.SetHandlerLifetime(TimeSpan.FromMinutes(5)) //Sample. Default lifetime is 2 minutes
|
||||
.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>()
|
||||
.AddPolicyHandler(retriesWithExponentialBackoff)
|
||||
.AddPolicyHandler(circuitBreaker);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user