Class HttpApiClient

java.lang.Object
com.google.adk.sessions.HttpApiClient

public class HttpApiClient extends Object
Base client for the HTTP APIs.
  • Field Details

    • MEDIA_TYPE_APPLICATION_JSON

      public static final okhttp3.MediaType MEDIA_TYPE_APPLICATION_JSON
  • Method Details

    • request

      public ApiResponse request(String httpMethod, String path, String requestJson)
      Sends a Http request given the http method, path, and request json string.
    • vertexAI

      public boolean vertexAI()
      Returns whether the client is using Vertex AI APIs.
    • project

      public @Nullable String project()
      Returns the project ID for Vertex AI APIs.
    • location

      public @Nullable String location()
      Returns the location for Vertex AI APIs.
    • apiKey

      public @Nullable String apiKey()
      Returns the API key for Google AI APIs.