Browse Source

Changed order in pipeline so SetHandlerLifetime() is first, right on the on the IHttpClientBuilder that is returned when creating the Typed Client.

pull/632/head
Cesar De la Torre Llorente 6 years ago
parent
commit
6127457e8e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Web/WebMVC/Startup.cs

+ 1
- 1
src/Web/WebMVC/Startup.cs View File

@ -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…
Cancel
Save