Class HttpApiResponse

java.lang.Object
com.google.adk.network.ApiResponse
com.google.adk.network.HttpApiResponse
All Implemented Interfaces:
AutoCloseable

public final class HttpApiResponse extends ApiResponse
Wraps a real HTTP response to expose the methods needed by the GenAI SDK.
  • Constructor Details

    • HttpApiResponse

      public HttpApiResponse(okhttp3.Response response)
      Constructs a HttpApiResponse instance with the response.
  • Method Details

    • getEntity

      public okhttp3.ResponseBody getEntity()
      Returns the ResponseBody from the response.
      Specified by:
      getEntity in class ApiResponse
    • close

      public void close()
      Closes the Http response.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in class ApiResponse