Class HttpApiResponse
java.lang.Object
com.google.adk.sessions.ApiResponse
com.google.adk.sessions.HttpApiResponse
- All Implemented Interfaces:
AutoCloseable
Wraps a real HTTP response to expose the methods needed by the GenAI SDK.
-
Constructor Summary
ConstructorsConstructorDescriptionHttpApiResponse
(okhttp3.Response response) Constructs a HttpApiResponse instance with the response. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the Http response.okhttp3.ResponseBody
Returns the HttpEntity from the response.
-
Constructor Details
-
HttpApiResponse
public HttpApiResponse(okhttp3.Response response) Constructs a HttpApiResponse instance with the response.
-
-
Method Details
-
getResponseBody
public okhttp3.ResponseBody getResponseBody()Returns the HttpEntity from the response.- Specified by:
getResponseBody
in classApiResponse
-
close
public void close()Closes the Http response.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classApiResponse
-