class_docstr: Json API client implementation.
  
  This client is used to interact with a Json API server and perform various actions
  such as triggering DAG runs,deleting DAGs, interacting with pools, and getting lineage information.
class_docstr_tok: ["Json","API","client","implementation",".","This","client","is","used","to","interact","with","a","Json","API","server","and","perform","various","actions","such","as","triggering","DAG","runs",",","deleting","DAGs",",","interacting","with","pools",",","and","getting","lineage","information","."]
docstr: Make a request to the Json API server.
  
  :param url: The URL to send the request to.
  :param method: The HTTP method to use (e.g. "GET", "POST", "DELETE").
  :param json: A dictionary containing JSON data to send in the request body.
  :return: A dictionary containing the JSON response from the server.
  :raises OSError: If the server returns an error status.
docstr_tok: ["Make","a","request","to","the","Json","API","server",".",":","param","url",":","The","URL","to","send","the","request","to",".",":","param","method",":","The","HTTP","method","to","use","(","e.g",".","``","GET","''",",","``","POST","''",",","``","DELETE","''",")",".",":","param","json",":","A","dictionary","containing","JSON","data","to","send","in","the","request","body",".",":","return",":","A","dictionary","containing","the","JSON","response","from","the","server",".",":","raises","OSError",":","If","the","server","returns","an","error","status","."]
code: def _request(self, url: str, json=None, method: str = "GET") -> dict:
      """Make a request to the Json API server.
  
      :param url: The URL to send the request to.
      :param method: The HTTP method to use (e.g. "GET", "POST", "DELETE").
      :param json: A dictionary containing JSON data to send in the request body.
      :return: A dictionary containing the JSON response from the server.
      :raises OSError: If the server returns an error status.
      """
      params = {
          "url": url,
      }
      if json is not None:
          params["json"] = json
      resp = getattr(self._session, method.lower())(**params)
      if resp.is_error:
          # It is justified here because there might be many resp types.
          try:
              data = resp.json()
          except Exception:
              data = {}
          raise OSError(data.get("error", "Server error"))
      return resp.json()
  
file_path: airflow/airflow/api/client/json_client.py
imports: from __future__ import annotations
  from urllib.parse import urljoin
  from airflow.api.client import api_client
label_desc: Use image node_id 1 for calling the Client obj's underlying member method code with example usage: obj._request(url, json, method) and returns: resp