You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
780 B
22 lines
780 B
namespace Lion.AbpPro.HttpApi.Client.ConsoleTestApp
|
|
{
|
|
[DependsOn(
|
|
typeof(AbpProHttpApiClientModule),
|
|
typeof(AbpHttpClientIdentityModelModule)
|
|
)]
|
|
public class AbpProConsoleApiClientModule : AbpModule
|
|
{
|
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
PreConfigure<AbpHttpClientBuilderOptions>(options =>
|
|
{
|
|
options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) =>
|
|
{
|
|
clientBuilder.AddTransientHttpErrorPolicy(
|
|
policyBuilder => policyBuilder.WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(Math.Pow(2, i)))
|
|
);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|