feat(http-client): allow to construct a JdkA2AHttpClient with a prebuilt HttpClient by maff · Pull Request #745 · a2aproject/a2a-java · GitHub
Skip to content

feat(http-client): allow to construct a JdkA2AHttpClient with a prebuilt HttpClient - #745

Merged
ehsavoie merged 1 commit into
a2aproject:mainfrom
maff:custom-http-client
Mar 20, 2026
Merged

ehsavoie merged 1 commit into
a2aproject:mainfrom
maff:custom-http-client

Conversation

@maff

@maff maff commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Description

A prebuilt HttpClient can be used to adapt for environment specific circumstances, e.g. by configuring a proxy or a specific SSL context.

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
    • Important Prefixes for release-please:
      • fix: which represents bug fixes, and correlates to a SemVer patch.
      • feat: represents a new feature, and correlates to a SemVer minor.
      • feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
  • Ensure the tests pass
  • Appropriate READMEs were updated (if necessary)

Fixes #744 🦕

Allows to configure the HTTP client for environment specific circumstances, e.g. by configuring a proxy or a specific SSL context.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a valuable feature allowing the JdkA2AHttpClient to be constructed with a pre-built java.net.http.HttpClient. This enhances flexibility by enabling users to configure environment-specific settings like proxies or custom SSL contexts. The implementation is well-executed, featuring a new constructor with proper null-checking and a clean refactoring of the default constructor. The accompanying tests are thorough, covering the new functionality, regression, and edge cases. The documentation update in the README is also clear and helpful.

@maff maff changed the title feat(http-client): allow to construct a JdkA2AHttpClient with a prebuild HttpClient feat(http-client): allow to construct a JdkA2AHttpClient with a prebuilt HttpClient Mar 14, 2026
@maff

maff commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

@ehsavoie thanks for the review! Anything left before we can merge this?

@ehsavoie
ehsavoie merged commit fd33b3d into a2aproject:main Mar 20, 2026
12 checks passed
@ehsavoie

Copy link
Copy Markdown
Collaborator

salaboy pushed a commit to salaboy/a2a-java that referenced this pull request Jun 19, 2026
…ilt HttpClient (a2aproject#745)

# Description

A prebuilt HttpClient can be used to adapt for environment specific
circumstances, e.g. by configuring a proxy or a specific SSL context.

- [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md).
- [x] Make your Pull Request title in the
<https://www.conventionalcommits.org/> specification.
- Important Prefixes for
[release-please](https://github.com/googleapis/release-please):
- `fix:` which represents bug fixes, and correlates to a
[SemVer](https://semver.org/) patch.
- `feat:` represents a new feature, and correlates to a SemVer minor.
- `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking
change (indicated by the `!`) and will result in a SemVer major.
- [x] Ensure the tests pass
- [x] Appropriate READMEs were updated (if necessary)

Fixes a2aproject#744 🦕
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.

[Feat]: allow building JdkA2AHttpClient with a preconfigured JDK HttpClient

2 participants