class_docstr: State API Client issues REST GET requests to the server for resource states.
class_docstr_tok: ["State","API","Client","issues","REST","GET","requests","to","the","server","for","resource","states","."]
code: def _make_http_get_request(
      self,
      endpoint: str,
      params: Dict,
      timeout: float,
      _explain: bool = False,
  ) -> Dict:
      with warnings_on_slow_request(
          address=self._address,
          endpoint=endpoint,
          timeout=timeout,
          explain=_explain,
      ):
          # Send a request.
          response = None
          try:
              response = self._do_request(
                  "GET",
                  endpoint,
                  timeout=timeout,
                  params=params,
              )
              # If we have a valid JSON error, don't raise a generic exception but
              # instead let the caller parse it to raise a more precise exception.
              if (
                  response.status_code == 500
                  and "application/json"
                  not in response.headers.get("Content-Type", "")
              ):
                  response.raise_for_status()
          except requests.exceptions.RequestException as e:
              err_str = f"Failed to make request to {self._address}{endpoint}. "
  
              # Best-effort to give hints to users on potential reasons of connection
              # failure.
              err_str += (
                  "Failed to connect to API server. Please check the API server "
                  "log for details. Make sure dependencies are installed with "
                  "`pip install ray[default]`. Please also check dashboard is "
                  "available, and included when starting ray cluster, "
                  "i.e. `ray start --include-dashboard=True --head`. "
              )
              if response is None:
                  raise ServerUnavailable(err_str)
  
              err_str += f"Response(url={response.url},status={response.status_code})"
              raise RayStateApiException(err_str) from e
  
      # Process the response.
      response = response.json()
      if response["result"] is False:
          raise RayStateApiException(
              "API server internal error. See dashboard.log file for more details. "
              f"Error: {response['msg']}"
          )
  
      # Dictionary of `ListApiResponse` or `SummaryApiResponse`
      return response["data"]["result"]
  
imports: import logging
  import threading
  import urllib
  import warnings
  from contextlib import contextmanager
  from dataclasses import fields
  from typing import Any, Dict, Generator, List, Optional, Tuple, Union
  import requests
  from ray.dashboard.modules.dashboard_sdk import SubmissionClient
  from ray.dashboard.utils import get_address_for_submission_client, ray_address_to_api_server_url
  from ray.util.annotations import DeveloperAPI
  from ray.util.state.common import DEFAULT_LIMIT, DEFAULT_RPC_TIMEOUT, ActorState, ClusterEventState, GetApiOptions, GetLogOptions, JobState, ListApiOptions, NodeState, ObjectState, PlacementGroupState, PredicateType, RuntimeEnvState, StateResource, SummaryApiOptions, SummaryResource, SupportedFilterType, TaskState, WorkerState, dict_to_state
  from ray.util.state.exception import RayStateApiException, ServerUnavailable
label_desc: Use image node_id 3 for calling the StateApiClient obj's underlying member method code with example usage: obj._make_http_get_request(endpoint, params, timeout, _explain) and returns: response