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

Request Retry #99

Closed
jwardle opened this issue Aug 16, 2016 · 4 comments
Closed

Request Retry #99

jwardle opened this issue Aug 16, 2016 · 4 comments

Comments

@jwardle
Copy link

jwardle commented Aug 16, 2016

Currently Siesta does not allow your to retry a request (created via load*() functions). You can only "retry" a standard Resource by calling load() or loadIfNeeded() which does not support RequestMethods other than GET, and loses all previously appended onSuccess / onFailure / onCompletion callbacks. If the developer wishes to retry a more complex request then they have to reconstruct from scratch.

A function to allow a previously failed request to be recreated (maintaining RequestMethod & callbacks) or to be retried entirely would be useful to avoid duplication of request generation code in POST / PUT / etc. scenarios. Without this it makes it difficult to create robust utility classes to handle negative conditions.

@pcantrell
Copy link
Member

Please take a look at #98. It may be what you’re looking for. That pull request is open for user experimentation and feedback, so let me know what you think!

@jwardle
Copy link
Author

jwardle commented Aug 17, 2016

Initial view of #98 having integrated it into our project looks spot on - will report back with any feedback. Additionally, this approach appears to have resolved a gap we were also facing with the token renewal / request retry cycle which you example clearly proposes a resolution for given the new changes.

@pcantrell
Copy link
Member

Awesome! Thanks, @jwardle. I was waiting for second party confirmation that #98 isn’t broken before merging it. If you’ve tried it and yellow smoke didn’t come pouring out the vents, then I’ll go ahead and merge it.

@pcantrell
Copy link
Member

pcantrell commented Aug 17, 2016

Merged #98. Closing this, but it’s new functionality in need of more eyes — so please send questions, bugs, and enhancement ideas early and often!

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