Skip to content

Conversation

@swnck
Copy link
Owner

@swnck swnck commented May 20, 2025

This pull request introduces support for specifying the HTTP protocol version in requests, alongside some minor refactoring and test additions. The most important changes include adding a new setVersion method to configure the HTTP version, updating the JxResponse class to handle this new configuration, and adding a test case to validate the functionality.

HTTP Version Support:

  • Added a new setVersion method in AbstractRequest to allow users to specify the desired HttpClient.Version for HTTP requests. This method includes validation to ensure the version is not null.
  • Updated the JxResponse constructor to include the HTTP version when building the request.
  • Introduced a new version field in AbstractRequest with a default value of HttpClient.Version.HTTP_1_1.

Testing:

  • Added a new test case getWithVersion in JxRequestTest to verify that the HTTP version can be set to HTTP_2 and that the request executes successfully.

Minor Refactoring:

  • Removed extensive inline comments from AbstractRequest to simplify the codebase.
  • Added a missing import for HttpClient in AbstractRequest and JxRequestTest. [1] [2]

…sponse and tests accordingly; bump version to 1.0.5
@swnck swnck merged commit 63bc597 into master May 20, 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