-
Notifications
You must be signed in to change notification settings - Fork 129
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
👽 deprecate all lower-case HTTP method annotations #651
👽 deprecate all lower-case HTTP method annotations #651
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #651 +/- ##
========================================
Coverage 93.38% 93.38%
========================================
Files 21 21
Lines 499 499
========================================
Hits 466 466
Misses 33 33 ☔ View full report in Codecov by Sentry. |
@Guldem @JEuler what are your takes on this considering #632 (comment)? I've noticed that retrofit.dart uses the same approach https://github.com/trevorwang/retrofit.dart/blob/241695bd5af27ddfd60914be1334eb95ce1cc94b/retrofit/lib/http.dart#L124 |
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. I kinda dislike the whole deprecation but this is also more inline with usual writing of http methods. That's also a plus I guess 😉
So cool! Thank you! |
We can remove them somewhere in future. |
This pull request includes changes to the
chopper
library to standardize HTTP method annotations by replacing the old annotations with new uppercase versions and marking the old ones as deprecated. Additionally, it updates the test service to use the new annotations.Standardization of HTTP method annotations:
chopper/lib/src/annotations.dart
: Introduced new uppercase HTTP method annotations (GET
,POST
,PUT
,DELETE
,PATCH
,HEAD
,OPTIONS
) and marked the old ones as deprecated. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]chopper/lib/src/annotations.dart
: Updated constant definitions to use the new uppercase HTTP method annotations.Updates to test service:
chopper/test/test_service.dart
: Replaced all instances of the old HTTP method annotations with the new uppercase versions in theHttpTestService
class. [1] [2] [3] [4]Fixes #632 based on #632 (comment)