有没有人在Android上使用HttpUrlConnection有一个工作的PATCH请求示例?我尝试过这样的事情:
HttpURLConnection conn = (HttpURLConnection) (new URL(myUrl).openConnection();
conn.setDoOutput(true);
conn.setRequestMethod("PATCH");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("Accept", "application/json");
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(" {\"name\": \"john\" }");
wr.flush();
由于