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

Added support for all HttpMethod and HttpStatus #176

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

sdstoehr
Copy link
Owner

Fixes #168


Added backward compatible support for HttpMethods and HttpStatuses, which are not included in the respective enums. The raw values can be accessed through HttpRequest.getRawMethod() or HttpResponse.getRawStatus().
The behaviour of the old fields are unchanged (which might lead to the situation, that getStatus() = 0 (unknown status code) but getRawStatus() != 0

The only change in behaviour is, that previously an unsupported HttpMethod led to an exception during serialization, whereas it now serializes the method to HttpMethod.UNKNOWN with the real underlying value in the rawMethod field.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.18%. Comparing base (caed2e8) to head (0e8eab8).
Report is 182 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (caed2e8) and HEAD (0e8eab8). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (caed2e8) HEAD (0e8eab8)
2 1
Additional details and impacted files
@@              Coverage Diff              @@
##               main     #176       +/-   ##
=============================================
- Coverage     99.26%   67.18%   -32.08%     
+ Complexity      447      306      -141     
=============================================
  Files            24       24               
  Lines           682      701       +19     
  Branches        130      131        +1     
=============================================
- Hits            677      471      -206     
- Misses            5      206      +201     
- Partials          0       24       +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sdstoehr sdstoehr merged commit ae9403e into main Nov 13, 2024
4 of 5 checks passed
@thc202
Copy link

thc202 commented Nov 13, 2024

Thank you!

@sdstoehr
Copy link
Owner Author

Is included in version 2.4.0 - might take a while until it is available through Maven Central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace enums HttpMethod and HttpStatus with String/int or provide access to "raw" values
2 participants