Implement retry

I would like to know how can I implement a retry/wait policy depending on http code result. What I really need is use Polly library for Syncfusion components in the same way that I use it for the rest of my services. In my previous post (THREAD ID: 157852) several months ago I suggested to expose httpclient as a parameter of SfDataManager instead of the URLs, it would be great, because I could you use an Unique configuration for both, my internal services and SyncFusion components.

Once again you are doing a great job and excellent service here in the forum !!!.

1 Reply 1 reply marked as answer

JP Jeevakanth Palaniappan Syncfusion Team February 10, 2021 12:56 PM UTC

Hi Zeun, 

Greetings from Syncfusion support. 

We have analyzed your query and you suggested us to expose the HttpClient for your customization. To achieve this we suggest you to configure the HttpClient before registering the Syncfusion service in startup project. If HttpClient is already registered then we won’t create a new instance. We will use the already registered HttpClient. 

        public void ConfigureServices(IServiceCollection services) 
        { 
            services.AddScoped<HttpClient>(); //configure HttpClient here 
            services.AddSyncfusionBlazor(); 
        } 

Also please refer the below documentation which may help you to achieve your requirement. 


Regards, 
Jeevakanth SP. 
 


Marked as answer
Loader.
Up arrow icon