private static JsonObject executeHttpRequest(String url, String method, Map<String, String> queryParams,
            Map<String, String> headers) {
        HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(url)).newBuilder();

        for (Map.Entry<String, String> entry : queryParams.entrySet()) {
            urlBuilder.addQueryParameter(entry.getKey(), entry.getValue());
        }
        HttpUrl httpUrl = urlBuilder.build();

        Request.Builder requestBuilder = new Request.Builder()
                .url(httpUrl);

        for (Map.Entry<String, String> entry : headers.entrySet()) {
            requestBuilder.addHeader(entry.getKey(), entry.getValue());
        }
        RequestBody body = RequestBody.create(MediaType.parse(CONTENT_TYPE), "");

        switch (method.toUpperCase()) {
            case POST:
                requestBuilder.post(body);
                break;
            case GET:
                requestBuilder.get();
                break;
            case DELETE:
                requestBuilder.delete(body);
                break;
            default:
                throw new DolphinScheduleException(INVALID_HTTP_METHOD,
                        String.format("Unsupported request method: %s", method));
        }

        Request request = requestBuilder.build();

        // get response
        try (Response response = CLIENT.newCall(request).execute()) {
            String responseBody = response.body() != null ? response.body().string() : null;
            LOGGER.debug("HTTP request to {} completed with status code {}", httpUrl, response.code());

            if (response.isSuccessful() && responseBody != null) {
                return JsonParser.parseString(responseBody).getAsJsonObject();
            } else {
                LOGGER.error("HTTP request to {} failed. HTTP Status: {}, Response Body: {}", httpUrl, response.code(),
                        responseBody != null ? responseBody : "No response body");

                throw new DolphinScheduleException(
                        HTTP_REQUEST_FAILED,
                        String.format("HTTP request to %s failed. Status: %d, Response: %s",
                                httpUrl, response.code(), responseBody != null ? responseBody : "No response body"));
            }
        } catch (IOException e) {
            throw new DolphinScheduleException(
                    NETWORK_ERROR,
                    String.format("Network error during HTTP request to %s. Reason: %s", httpUrl, e.getMessage()));
        } catch (Exception e) {
            throw new DolphinScheduleException(
                    UNEXPECTED_ERROR,
                    String.format("Unexpected error during HTTP request to %s. Reason: %s", httpUrl, e.getMessage()));
        }
    }
Executes an HTTP request using OkHttp. Supports various HTTP methods (GET, POST, PUT, DELETE).

@param url         The URL of the request.
@param method      The HTTP method (GET, POST, PUT, DELETE).
@param queryParams The query parameters for the request (optional).
@param headers     The headers for the request.
@return A JsonObject containing the response from the server.
@throws DolphinScheduleException If an error occurs during the request.
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java