Skip to content

feat: expose HTTP response headers in A2AHttpResponse and A2AClientHT…#922

Open
kabir wants to merge 1 commit into
a2aproject:mainfrom
kabir:http-headers
Open

feat: expose HTTP response headers in A2AHttpResponse and A2AClientHT…#922
kabir wants to merge 1 commit into
a2aproject:mainfrom
kabir:http-headers

Conversation

@kabir

@kabir kabir commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

…TPError

Add A2AHttpHeaders interface as a transport-independent abstraction over HTTP response headers, with implementations for JDK, Vert.x, and Android HTTP clients. Headers are also propagated into A2AClientHTTPError so callers can access headers like Retry-After (429) and WWW-Authenticate (401) from error responses.

This fixes #920

@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 read-only abstraction for HTTP response headers (A2AHttpHeaders) and propagates these headers through HTTP clients, JSON-RPC transport, and REST error mappers into A2AClientHTTPError. This allows callers to inspect critical headers like Retry-After on rate-limited responses. Feedback highlights two key improvements: adding defensive null checks in the Android HTTP client to prevent a potential NullPointerException when parsing connection headers, and copying headers into a case-insensitive map within A2AClientHTTPError to preserve RFC 7230 case-insensitivity compliance.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread spec/src/main/java/org/a2aproject/sdk/spec/A2AClientHTTPError.java
…TPError

Add A2AHttpHeaders interface as a transport-independent abstraction over
HTTP response headers, with implementations for JDK, Vert.x, and Android
HTTP clients. Headers are also propagated into A2AClientHTTPError so
callers can access headers like Retry-After (429) and WWW-Authenticate
(401) from error responses.

This fixes a2aproject#920

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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]: A2AHttpResponse should expose response headers

1 participant