Skip to content

1.4.0

Choose a tag to compare

@ZacSweers ZacSweers released this 19 May 16:39
· 37 commits to main since this release

Happy new year!

A common pattern in making network requests is to retry with exponential backoff. EitherNet now ships with a highly configurable retryWithExponentialBackoff() function for this case.

// Defaults for reference
val result = retryWithExponentialBackoff(
  maxAttempts = 3,
  initialDelay = 500.milliseconds,
  delayFactor = 2.0,
  maxDelay = 10.seconds,
  jitterFactor = 0.25,
  onFailure = null, // Optional Failure callback for logging
) {
    api.getData()
}
  • Update to Kotlin 1.8.21.
  • Update to Kotlin Coroutines 1.7.1.
  • EitherNet now depends on org.jetbrains.kotlinx:kotlinx-coroutines-core.