Spotify.NET/SpotifyAPI.Web/RetryHandlers/IRetryHandler.cs
2024-02-10 11:42:55 +01:00

16 lines
505 B
C#

using System.Threading;
using System.Threading.Tasks;
namespace SpotifyAPI.Web.Http
{
/// <summary>
/// The Retry Handler will be directly called after the response is retrived and before errors and body are processed.
/// </summary>
public interface IRetryHandler
{
delegate Task<IResponse> RetryFunc(IRequest request, CancellationToken cancel = default);
Task<IResponse> HandleRetry(IRequest request, IResponse response, RetryFunc retry, CancellationToken cancel = default);
}
}