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

Integrate fetch-retry #66

Closed
niftylettuce opened this issue Jun 23, 2018 · 6 comments
Closed

Integrate fetch-retry #66

niftylettuce opened this issue Jun 23, 2018 · 6 comments

Comments

@niftylettuce
Copy link
Collaborator

https://github.com/jonbern/fetch-retry

@kasbah
Copy link

kasbah commented Oct 2, 2018

Could you explain why #73 amd #69 were linked here? They seem to be about setting a request timeout, a time period after which the request should be abandoned, like the XMLHttpRequest timeout. I don't think integrating a "retry" package will help with that.

@niftylettuce
Copy link
Collaborator Author

I think that .retry and .timeout options should be added together to be honest.

(async () => {
  const frisbee = new Frisbee({
    // ...
    timeout: 10000, // 10 seconds
    retry: 0 // 0 = infinite retries
  });

  // could also use `.timeout` and `.retry` methods to set on a per-request basis
  const response = await frisbee.get('/').timeout(3000).retry(3);
}());

@kasbah
Copy link

kasbah commented Oct 5, 2018

Sure, makes sense to use them together like that. Do I have it correct though that actually adding a timeout wouldn't require a retry package and it could be used without retries?

@niftylettuce
Copy link
Collaborator Author

Correct @kasbah, but in an ideal world we want to retry X number of times after Y number of timeout seconds per retry.

@niftylettuce
Copy link
Collaborator Author

cc @davidgovea

@niftylettuce
Copy link
Collaborator Author

Closing in favor of #92

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

No branches or pull requests

2 participants