-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Pool Manager: limit, pause and cancel requests #96
Closed
Closed
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a40bd9b
Add PoolManager
vixez 38c1152
Update changelog and readme
vixez c6ab04e
Cleanup
vixez 01775b9
Remove kSkipPoolHeader from requests
vixez ed1a8f3
Move poolResource to _attemptRequest
vixez 8ec1f6a
Expose tokenUpdateRequested
vixez ad57084
fix: _tokenUpdateRequested should not default to true
vixez bb762bb
feat: events + manual release + pause
vixez ab33bf8
merge
vixez 55ff368
fix: add missing fields in copyWith
vixez 7c8e25f
chore: cleanup
vixez c8d6e84
test: updated tests
vixez dc5fa8f
Merge branch 'fix/copywith-missing-fields' into feat/2.0-beta-update
vixez 67ee2e7
ver: 2.0.0-beta.3
vixez 291e9c7
Merge branch 'fix/copywith-missing-fields' into feat/2.0-beta-update
vixez 9ef43ca
feat: _retryCount Map + catch exception in retry exception
vixez ecb67b3
feat: add request to shouldAttemptRetryOnException
vixez 81d7fb1
test: update test
vixez 05322fa
chore: cleanup
vixez 18d2ca8
example: update shouldAttemptRetryOnException in example
vixez 22480d8
Merge branch 'main' into improvement/retry-exception-add-request
vixez 6ab940b
docs: updated changelog
vixez 4f93fb8
ver: 2.0.0-beta.4
vixez 03957a6
Merge branch 'improvement/retry-exception-add-request' into feature/p…
vixez 3427f76
feat: cancel all active requests
vixez a68a001
Merge branch 'main' into feature/pool-manager
vixez 9729c68
feat: throwCanceledException
vixez 8bf3a1f
fix: release pool request when this had already been done
vixez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export 'package:http_interceptor/exceptions/request_exceptions.dart'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:http/http.dart'; | ||
|
||
class RequestCancelledException implements Exception { | ||
final BaseRequest request; | ||
|
||
RequestCancelledException(this.request); | ||
|
||
String toString() { | ||
return 'The request has been cancelled (${request.url})'; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
library http_interceptor; | ||
|
||
export 'package:http/http.dart'; | ||
export 'package:http_interceptor/exceptions/exceptions.dart'; | ||
export 'package:http_interceptor/extensions/extensions.dart'; | ||
export 'package:http_interceptor/http/http.dart'; | ||
export 'package:http_interceptor/managers/managers.dart'; | ||
export 'package:http_interceptor/models/models.dart'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export 'pool_manager.dart'; |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's best if we expose
http
package along with this package so we can avoid having to install manuallyhttp
when usinghttp_interceptor
.