这里我试图通过rest api更新office 365中的用户。在尝试以下代码时
String data = {"displayName": "kannan",
"userPrincipalName": "kannan@sennovate.onmicrosoft.com",
"manager": "0d891c03-b125-4126-b10f-c64c74c3aaac",
"accountEnabled": "true",
"mailNickname": "kannan",
"usageLocation": "IN"}
conn.setRequestMethod("PATCH");
conn.setRequestProperty("Content-Length", String.valueOf(data.length()));
它将响应代码返回为411
,需要内容长度。但我已经设定了价值。有什么不对吗?