[英]500:Internal Server Error while sending Post Request
This is the implementation class to get Token but while i am making a POST call its throwing me Internal Server Error, Could anyone help me out on this这是获取令牌的实现 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();
}
A 500 series error means something wrong and unexpected happened on the server side. 500 系列错误意味着服务器端发生了错误和意外。 The problem is not with your query.
问题不在于您的查询。 You should try to contact microsoft (ie put in a bug report) about this
您应该尝试就此联系微软(即提交错误报告)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.