HttpURLConnection发送GET自动转为POST

0

使用HttpURLConnection发送GET请求,如果带有请求体会自动转为POST请求:

private synchronized OutputStream getOutputStream0() throws IOException {
...
	if (method.equals("GET")) {
		method = "POST"; // Backward compatibility
	}
...