DELETE请求

@param url 请求的URL
@param body 内容正文

@return 响应内容

@since 1.1.0
321862
public static String delete(String url, Map<String, String> body) {
        return delete(url, JSONObject.toJSONString(body));
    }
819934
public function delete(string $url, array $params = []): HttpResponse
    {
        return $this->send('DELETE', $url, [
            $this->bodyFormat => $params,
        ]);
    }
878731
private void urlWithParamIfGet() {
		if (Method.GET.equals(method) && false == this.isRest) {
			// 优先使用body形式的参数，不存在使用form
			if (ArrayUtil.isNotEmpty(this.bodyBytes)) {
				this.url = HttpUtil.urlWithForm(this.url, StrUtil.str(this.bodyBytes, this.charset), this.charset, false);
			} else {
				this.url = HttpUtil.urlWithForm(this.url, this.form, this.charset, false);
			}
		}
	}
1350302
public static Response delete(String url, Map<String, String> query) throws HttpException {

		return delete(url, query, null, DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT);
	}
696739
public static Map<String, String> parseUrl(String url) {
        Map<String, String> result = new HashMap<>(8);
        result.put(PROTOCOL_KEY, ValueConsts.EMPTY_STRING);
        result.put(HOST_KEY, ValueConsts.EMPTY_STRING);
        result.put(PATH_KEY, ValueConsts.EMPTY_STRING);
        if (Checker.isNotEmpty(url)) {
            String[] pros;
            final String protocolSplit = "://";
            if (url.contains(protocolSplit)) {
                pros = url.split(protocolSplit);
            } else {
                pros = new String[]{"", url};
            }
            // 设置主机、协议、路径
            result.put(PROTOCOL_KEY, pros[0]);
            if (pros.length < ValueConsts.TWO_INT) {
                pros = new String[]{pros[0], ValueConsts.EMPTY_STRING};
            }
            if (pros[1].contains(ValueConsts.SPLASH_STRING)) {
                int lastIndex = pros[1].lastIndexOf(ValueConsts.SPLASH_STRING);
                if (pros[1].startsWith(ValueConsts.SPLASH_STRING)) {
                    // 文件协议
                    result.put(PATH_KEY, pros[1].substring(1));
                } else if (pros[1].contains(ValueConsts.SPLASH_STRING)) {
                    int index = pros[1].indexOf("/");
                    // 设置主机
                    result.put(HOST_KEY, pros[1].substring(0, index));
                    // 设置参数
                    if (pros[1].contains(ValueConsts.QUESTION_MARK)) {
                        lastIndex = pros[1].indexOf(ValueConsts.QUESTION_MARK);
                        String[] params = pros[1].split("\\?")[1].split("&");
                        for (String param : params) {
                            String[] kv = param.split("=");
                            result.put(kv[0], kv[1]);
                        }
                    }
                    // 设置路径
                    if (lastIndex > index) {
                        String path = pros[1].substring(index + 1, lastIndex);
                        path = path.endsWith(ValueConsts.SPLASH_STRING) ? path.substring(0, path.length() - 1) : path;
                        result.put(PATH_KEY, path);
                    }
                } else {
                    result.put(HOST_KEY, pros[1]);
                }
            } else {
                result.put(HOST_KEY, pros[1]);
            }
        }
        return result;
    }
292818
public Object deleteRequest(String restUrl, Map<String, String> params) throws IOException, WebServiceException {
		return this.postRequest(HttpMethod.DELETE, restUrl, params);
	}
318997
def rest_delete(url, timeout):
    ''''''
    try:
        response = requests.delete(url, timeout=timeout)
        return response
    except Exception as e:
        print('Get exception {0} when sending http delete to url {1}'.format(str(e), url))
        return None
157736
def delete(url)
      parameters = Specification.new(url: Types::URL).parameters(url: url)
      @client.action('/posts/delete', parameters)
      self
    end
805179
public static String get(String url, Map<String, String> body) {
        return get(url, JSONObject.toJSONString(body));
    }
1016928
def delete(self, url):
        
        response = requests.delete(
            self.host + url,
            headers={
              'Authorization': 'Bearer ' + self.token,
              'x-falkonry-source':self.sourceHeader
            },
            verify=False
        )
        if response.status_code == 204:
            return None
        elif response.status_code == 401:
            raise Exception(json.dumps({'message':'Unauthorized Access'}))
        else:
            raise Exception(response.content)
360755
public Response delete(String restPath, Map<String, String> queryParams) {
		LOG.debug("DELETE: {}", restPath);
		return call(HttpMethod.DELETE, restPath, Response.class, null, queryParams);
	}
943348
public static String post(String url, String body, Boolean isJson) {
        ExceptionUtil.notNull(url);
        return post(url, null, null, null, body, isJson);
    }
1325974
@DeleteMapping("/setting/delete/url")
    public void deleteValidationUrl(HttpServletRequest req, @RequestBody ReqUrl reqUrl) {
        this.validationSessionComponent.sessionCheck(req);
        this.msgSettingService.deleteValidationData(reqUrl);
    }
155592
public NextResponse delete(final String url, final Map<String, String> queries,
                               final Map<String, String> headers)
            throws IOException {
        return request(HttpMethod.DELETE, url, queries, null, headers);
    }
71224
public JSONObject delete(String url, HashMap<String, String> params) throws JSONException {
		return sendPostRequest(url, METHOD_DELETE, params);
	}
268038
public void DELETE(String partialUrl, Map<String, Object> headers, 
        List<String> queryParams)
    {
        URI uri = buildUri(partialUrl);
        executeDeleteRequest(uri, headers, queryParams);
    }
94279
public NextResponse delete2(final String url, final Map<String, String> forms,
                                final Map<String, String> headers)
            throws IOException {
        return request(HttpMethod.DELETE, url, null, forms, headers);
    }