Class AndroidA2AHttpClient

java.lang.Object
org.a2aproject.sdk.client.http.android.AndroidA2AHttpClient
All Implemented Interfaces:
A2AHttpClient

public class AndroidA2AHttpClient extends Object implements A2AHttpClient
Android-specific implementation of A2AHttpClient using HttpURLConnection.

Security Note: This client does not follow HTTP redirects automatically to prevent credential leakage to third-party origins. Explicitly enabled GET and POST redirects are followed once only when the target has the same origin. HttpURLConnection cannot isolate process-wide CookieHandler or Authenticator state for one request, so cross-origin redirects are deliberately not followed even when A2AHttpClient.GetBuilder.followRedirects(boolean) or A2AHttpClient.PostBuilder.followRedirects(boolean) is enabled.

  • Constructor Details

    • AndroidA2AHttpClient

      public AndroidA2AHttpClient()
    • AndroidA2AHttpClient

      public AndroidA2AHttpClient(SSEParserConfig sseParserConfig)
      Creates a new Android HTTP client with custom SSE parser limits.
      Parameters:
      sseParserConfig - the SSE parser configuration to use for streaming responses
    • AndroidA2AHttpClient

      public AndroidA2AHttpClient(SSEParserConfig sseParserConfig, RedirectHeaderPolicy redirectHeaderPolicy)
      Creates a new Android HTTP client with custom parser limits and redirect policy.
      Parameters:
      sseParserConfig - the SSE parser configuration to use for streaming responses
      redirectHeaderPolicy - policy applied to explicitly enabled POST redirects
  • Method Details