Add async systemOne and models listing returning CompletableFuture - #5
Merged
Merged
Conversation
Blocking and async calls now share one attempt path: HttpClient.sendAsync with retries scheduled on CompletableFuture.delayedExecutor, so backoff never holds a thread; blocking() unwraps the future for the sync API. Both paths honor the same per-call RequestOptions and retry policy and report the same TypeSafeException subclasses; request-setup errors still throw synchronously.
garretpremo
added a commit
that referenced
this pull request
Sep 19, 2026
systemOneAsync mirrors every systemOne overload and models().listAsync() joins models().list(). Both paths share one attempt loop on HttpClient.sendAsync with backoff on a delayed executor, honor the same per-call RequestOptions and retry policy, and fail with the same TypeSafeException subclasses (#4, #5). READMEs point at 0.3.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
CompletableFuturecounterparts to every entry point:systemOneAsync(...)for all sixsystemOneoverloadsmodels().listAsync()andlistAsync(RequestOptions)Blocking and async calls share one attempt path built on
HttpClient.sendAsync, with retries scheduled onCompletableFuture.delayedExecutorso backoff never holds a thread; the blocking API is the same future unwrapped byblocking(). Both honor the same per-callRequestOptionsand retry policy and report the sameTypeSafeExceptionsubclasses (serialization, status, timeout, connection, unreadable body, answer validation). Request-setup errors, like aTypeSafeRequestbuilt without state, throw synchronously exactly as they do on the blocking path.Adds eight async tests, an Async section to the README, and an Unreleased CHANGELOG entry.
Closes #4