|
|
|
@@ -1,5 +1,7 @@ |
|
|
|
package com.ruoyi.platform.utils; |
|
|
|
|
|
|
|
import com.ruoyi.common.core.utils.StringUtils; |
|
|
|
import com.ruoyi.platform.vo.HttpDeleteWithBody; |
|
|
|
import org.apache.http.HttpHost; |
|
|
|
import org.apache.http.client.methods.*; |
|
|
|
import org.apache.http.client.utils.URIBuilder; |
|
|
|
@@ -80,7 +82,11 @@ public class NewHttpUtils { |
|
|
|
} |
|
|
|
|
|
|
|
public static String sendDeleteWithToken(String url, String param, String token, String body) throws Exception { |
|
|
|
return sendRequest(new HttpDelete(), url, param, token, body); |
|
|
|
if (StringUtils.isNotEmpty(body)) { |
|
|
|
return sendRequest(new HttpDeleteWithBody(), url, param, token, body); |
|
|
|
} else { |
|
|
|
return sendRequest(new HttpDelete(), url, param, token, body); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static String sendPatchWithToken(String url, String param, String token, String body) throws Exception { |
|
|
|
|