ButterCMS / buttercms-csharp

.NET API client for ButterCMS (https://buttercms.com)
MIT License
40 stars 16 forks source link

Implement automatic retry into client #2

Closed Past9 closed 7 years ago

Past9 commented 7 years ago

This PR causes ButterCMSClient to retry failed requests up to a maximum number of tries. The max number of tries is configurable with the new optional maxRequestTries constructor parameter and is 3 by default. Requests will always execute at least once even when it's set to something like 0 or -10.

Request exceptions are handled as follows

This PR also fixes an issue where some of the model files were not included in ButterCMS.csproj.