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.
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.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps com.slack.eithernet:eithernet from 1.3.1 to 1.4.0.
Release notes
Sourced from com.slack.eithernet:eithernet's releases.
Changelog
Sourced from com.slack.eithernet:eithernet's changelog.
Commits
3aa1a1f
Prepare for release 1.4.0.0606bbe
Update coroutines to 1.7.1b8763ed
Kotlin 1.8.21 updates (#59)a9dbe84
Implement retryWithExponentialBackoff (#60)e0458f0
Spotless71c1ec2
Prepare next development version.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)