RetryPolicy

public protocol RetryPolicy

Protocol for Retry strategy. Has function returning amount of time before the next retry after an HTTP error

  • Returns whether we should retry and how long we should wait before retrying

    Declaration

    Swift

    func getRetryWaitTime(error: Error, attempt: Int) -> RetryStatus?

    Parameters

    error

    Error returned by HTTP client

    attempt

    retry attempt number