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

refactor(code_push_client): create http wrapper to standardize headers #648

Merged
merged 7 commits into from
Jun 14, 2023

Conversation

felangel
Copy link
Contributor

Description

  • refactor(code_push_client): create http wrapper to standardize headers

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@felangel felangel self-assigned this Jun 13, 2023
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +85.96 🎉

Comparison is base (5baa22c) 14.03% compared to head (70ec09e) 100.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##             main      #648       +/-   ##
============================================
+ Coverage   14.03%   100.00%   +85.96%     
============================================
  Files           4        71       +67     
  Lines         114      2668     +2554     
============================================
+ Hits           16      2668     +2652     
+ Misses         98         0       -98     
Impacted Files Coverage Δ
...ird_code_push_client/lib/src/code_push_client.dart 100.00% <100.00%> (ø)

... and 74 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@felangel felangel requested a review from eseidel June 13, 2023 23:35
@felangel felangel marked this pull request as ready for review June 13, 2023 23:35
@felangel felangel requested a review from bryanoltman June 14, 2023 15:20
final request = verify(() => httpClient.send(captureAny()))
.captured
.single as http.BaseRequest;
expect(request.method, equals('GET'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using the https://pub.dev/documentation/retrofit/latest/http/HttpMethod-class.html constants here and throughout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good call will update 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That comes from retrofit which isn't a dependency we currently have.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will merge as is for now but happy to adjust later I just didn't see those constants exported by package:http or dart:io

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake! Didn't realize it was from a different package 🤦

@felangel felangel merged commit 1450ae2 into main Jun 14, 2023
@felangel felangel deleted the refactor/code-push-client-http-wrapper branch June 14, 2023 15:27
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

Successfully merging this pull request may close these issues.

2 participants