We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
You don't need to return await ...:
return await ...
dart-rest-data/lib/src/adapters/mixins/http.dart
Lines 56 to 64 in ee58d83
Which could be safely rewritten to:
Future<http.Response> httpGet( String path, { Map<String, String> queryParams, }) { return _safelyRun(() { final url = Uri.https(hostname, path, queryParams); return http.get(url, headers: headers); }); }
The future chain will await by itself.
You only need to when in a try/catch block, since you need to get the future to resolve within your scope:
Lines 94 to 104 in ee58d83
The text was updated successfully, but these errors were encountered:
Sorry @avioli, this really went out of my radar - can you create a PR?
Thank you!
Sorry, something went wrong.
#16
No branches or pull requests
You don't need to
return await ...
:dart-rest-data/lib/src/adapters/mixins/http.dart
Lines 56 to 64 in ee58d83
Which could be safely rewritten to:
The future chain will await by itself.
You only need to when in a try/catch block, since you need to get the future to resolve within your scope:
dart-rest-data/lib/src/adapters/mixins/http.dart
Lines 94 to 104 in ee58d83
The text was updated successfully, but these errors were encountered: