public <T> AirflowResponse<T> sendRequest(AirflowApi<T> apiEndpoint) throws IOException {
        Request request = apiEndpoint.buildRequest(config.getBaseUrl());
        try (Response response = httpClient.newCall(request).execute()) {
            String responseBody = response.body().string();
            if (response.isSuccessful()) {
                return new AirflowResponse<>(true, objectMapper.readValue(responseBody, apiEndpoint.getResponseType()));
            } else {
                logger.error("Airflow Web API Request failed, status code: {} , detail: {}",
                        response.code(), objectMapper.readValue(responseBody, Error.class).getDetail());
                return new AirflowResponse<>(false, null);
            }
        }
    }
Send request and parse response

@param apiEndpoint apiEndpoint
@param <T>         Response to Generic Types
@return Parsed response object
@throws IOException Network request exception
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/airflow/AirflowServerClient.java