# Class HttpApiResponse

java.lang.Object
com.google.adk.sessions.ApiResponse
com.google.adk.sessions.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 Summary

  Constructors
  Constructor
  Description
  `HttpApiResponse(okhttp3.Response response)`
  Constructs a HttpApiResponse instance with the response.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes the Http response.
  `okhttp3.ResponseBody`
  `getResponseBody()`
  Returns the HttpEntity from the response.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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 class `ApiResponse`

  - ### close

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