[英]500:Internal Server Error while sending Post Request
這是獲取令牌的實現 class 但是當我進行 POST 調用時,它會拋出內部服務器錯誤,誰能幫我解決這個問題
MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();
map.add("client_id", "clientId");
map.add("tenant_id", "tenantId");
map.add("client_secret", "clientSecret");
map.add("scope", "scope");
map.add("grant_type", "granttype");
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<MultiValueMap<String, String>>(map, headers);
ResponseEntity<Response> response = resttemplate.postForEntity(
"https://login.microsoftonline.com/{tenantId}/${tokenversion}/token", request, Response.class,tenantId,tokenversion);
return response.getBody().getAccess_token();
}
500 系列錯誤意味着服務器端發生了錯誤和意外。 問題不在於您的查詢。 您應該嘗試就此聯系微軟(即提交錯誤報告)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.