code: def sql_via_http(
      self,
      request: str,
      expected_resp_type: str = None,
      context: dict = None,
      headers: dict = None,
      company_id: int = None,
  ) -> dict:
      if context is None:
          context = self._sql_via_http_context
  
      if headers is None:
          headers = {}
      if company_id is not None:
          headers["company-id"] = str(company_id)
  
      payload = {"query": request, "context": context}
      response = self.api_request(
          "post", "/sql/query", payload, headers
      )
  
      assert (
          response.status_code == 200
      ), f"sql/query is not accessible - {response.text}"
      response = response.json()
      if expected_resp_type is not None:
          assert response.get("type") == expected_resp_type, response
      else:
          assert response.get("type") in [
              RESPONSE_TYPE.OK,
              RESPONSE_TYPE.TABLE,
              RESPONSE_TYPE.ERROR,
          ], response
      assert isinstance(response.get("context"), dict)
      if response["type"] == "table":
          assert isinstance(response.get("data"), list)
          assert isinstance(response.get("column_names"), list)
      elif response["type"] == "error":
          assert isinstance(response.get("error_code"), int)
          assert isinstance(response.get("error_message"), str)
      self._sql_via_http_context = response["context"]
      return response
  
file_path: mindsdb/tests/integration_tests/flows/http_test_helpers.py
imports: import requests
  import time
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from .conftest import HTTP_API_ROOT
label_desc: Use image node_id 2 for calling the HTTPHelperMixin obj's underlying member method code with example usage: obj.sql_via_http(request, expected_resp_type, context, headers, company_id) and returns: response