Skip to content

Conversation

@swnck
Copy link
Owner

@swnck swnck commented May 19, 2025

This pull request introduces significant enhancements to the HTTP request and response handling capabilities, as well as improvements to CORS configuration. Key updates include adding support for additional HTTP methods, refactoring the request body handling into an abstract class, and improving documentation for better maintainability and clarity.

HTTP Request Enhancements:

  • Added static factory methods in JxRequest to support PUT, PATCH, and DELETE requests, both with and without URLs, improving flexibility for diverse use cases.
  • Introduced AbstractBody as a base class for handling HTTP request bodies, consolidating logic for methods like POST, PUT, and PATCH. This class provides mechanisms for setting and validating request body content.

HTTP Response Improvements:

  • Enhanced the JxResponse class to include detailed JavaDoc comments, clarifying its purpose and functionality, such as asynchronous HTTP request handling and response data processing. [1] [2]
  • Updated the JxResponse constructor to handle timeouts and refactored body content handling to use the new AbstractBody class. [1] [2]

CORS Configuration Improvements:

  • Expanded JavaDoc documentation in the Cors class, detailing its builder-style pattern and the purpose of its configuration methods. This includes methods for setting allowed origins, methods, headers, and credentials. [1] [2] [3] [4]

Documentation Updates:

  • Updated the README.md to reflect the newly supported HTTP methods (PUT, PATCH, DELETE) and the addition of timeout configuration.

These changes collectively enhance the usability, maintainability, and clarity of the codebase.

swnck added 3 commits May 18, 2025 21:33
…ody management; add DeleteRequest, PatchRequest, and PutRequest implementations; improve CORS configuration in AbstractRequest and Cors classes.
@swnck swnck merged commit 45f8ec8 into master May 19, 2025
2 checks passed
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