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 TypeMethodDescriptionvoidclose()Closes the Http response.okhttp3.ResponseBodyReturns 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:
getResponseBodyin classApiResponse
-
close
public void close()Closes the Http response.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classApiResponse
-