简单粗暴,直接上代码。
@SuppressWarnings("resource")
public static String deleteJson(String url, String json, int timeout, Object... objects) throws IOException {
/**
* 没有现成的delete可以带json的,自己实现一个,参考HttpPost的实现
*/
class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
public static final String METHOD_NAME = "DELETE";
@SuppressWarnings("unused")
public