qirong
2023-11-22 d6ef89e201c6ec2ff1f33db78f0833855a6785f2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/uitil/HttpUtils.java
@@ -151,19 +151,12 @@
//     * @param parameter
     * @throws Exception
     */
    public static void sendDeleteRequest(String url, Long[] parameters, String password) throws Exception {
        // 构建URL
        StringBuilder deleteUrl = new StringBuilder(url);
        deleteUrl.append("/");
        for (int i = 0; i < parameters.length; i++) {
            deleteUrl.append(parameters[i]);
            if (i < parameters.length - 1) {
                deleteUrl.append("/");
            }
        }
    public static void sendDeleteRequest(String url, String parameter) throws Exception {
        // 拼接URL和参数
        String deleteUrl = url + "/" + parameter;
        // 创建URL对象和HttpURLConnection对象
        URL obj = new URL(deleteUrl.toString());
        URL obj = new URL(deleteUrl);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();
        // 设置请求方法为DELETE