Closed KyrillosNageh closed 2 months ago
Attention: Patch coverage is 35.71429%
with 27 lines
in your changes missing coverage. Please review.
Project coverage is 54.23%. Comparing base (
3c6b582
) to head (6b22d7a
).
Files | Patch % | Lines |
---|---|---|
src/main/java/com/shaft/api/RequestBuilder.java | 35.71% | 21 Missing and 6 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request fixes a bug where query parameters were not being added to requests that also have a body. It improves the performRequest method to ensure query parameters are correctly appended to the URL, along with enhancing error handling and modularizing the code.
src/main/java/com/shaft/api/RequestBuilder.java
When making HTTP requests with both query parameters and a request body, the query parameters were ignored, resulting in incorrect request URLs.
Dynamic URL Construction: Added functionality to append query parameters to the request URL, ensuring they are not lost when a body is present. Comprehensive Error Management: Improved exception handling to manage errors during the request process effectively. Modular Helper Methods: Created helper methods to append query parameters, check supported request types, and handle exceptions.
Linked Issue: Fixes https://github.com/ShaftHQ/SHAFT_ENGINE/issues/1615