-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix: example of queued_interceptor_csrftoken.dart #2345
Fix: example of queued_interceptor_csrftoken.dart #2345
Conversation
/example directory has been updated to /example_dart
)}', | ||
); | ||
if (response.statusCode == null || response.statusCode! ~/ 100 != 2) { | ||
return handler.reject(error); |
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.
tokenRefreshDio need close
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 added closing lines for tokenRefreshDio
@seunghwanly |
Apologies, I couldn't get it right. tokenRefreshDio is used in this if-condition block and closed. Could you guide me on where to fix it or point to specific lines? dio/example_dart/lib/queued_interceptor_crsftoken.dart Lines 67 to 91 in 9af8b90
|
Would this be simpler? |
`tokenRefreshDio` closed in every condition but it could be closed right after request.
@Passer-by Thanks for the support! |
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.
LGTM
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
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.
Some nits about the comments
also, fixed the baseUrl + path combination more clearly, reflecting @AlexV525 review. baseUrl does not contain '/' and '/' is included starting from the path. L72 had a duplicated host, so I removed it.
I've incorporated the suggestions from your review into 66bab27. Thank you for your feedback :) |
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.
Thanks both @seunghwanly and @Passer-by for your continuous contributions!
Quick question! Since dio/dio/lib/src/interceptor.dart Lines 404 to 431 in e7edb97
|
} | ||
|
||
// To prevent repeated requests to the 'Authentication Server' | ||
// to update our 'access_token' with parallel requests, |
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 wrote 'parallel' here
I'm not sure about the word but it seems reasonable. |
Would using 'Independent Request' be better here? |
Referred to #2342
New Pull Request Checklist
main
branch to avoid conflicts (via merge from master or rebase)CHANGELOG.md
in the corresponding packageAdditional context and info (if any)
The example's misconception led users to misunderstand
QueuedInterceptor
. Also, with @Passer-by 's support, I added a token update policy.#2342 (comment)