Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Polling Client for Async APIs #9

Merged
merged 5 commits into from
Aug 14, 2024
Merged

Add Polling Client for Async APIs #9

merged 5 commits into from
Aug 14, 2024

Conversation

fern-bot
Copy link
Collaborator

@fern-bot fern-bot commented Aug 13, 2024

Adds a polling client that works with both asynchronous and synchronous APIs. It operates under the following conditions:

  • If the response specifies a header Location or the body contains a statusUrl, this url is extracted and polled for 30 seconds or until a completed or failed status is received.
  • If there is an unexpected failure in the first call, the error is returned.
  • If there is an unexpected failure in the second call, the error is returned.

src/PollingClient.ts Outdated Show resolved Hide resolved
@fern-bot fern-bot merged commit 7836c5a into main Aug 14, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants