简体   繁体   English

500:发送 Post 请求时发生内部服务器错误

[英]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.

相关问题 发送 Post 请求抛出 500 内部错误 - Sending a Post Request Throw 500 Internal error 改装后请求:500个内部服务器错误 - Retrofit post request: 500 internal server error 基于简单 REST 的程序中的 HTTP 500 内部服务器错误。 从服务器接收/发送响应时对 GET 和 POST 感到困惑 - HTTP 500 Internal Server Error in simple REST based program. Confused in GET and POST while receiving/sending response from server 500 来自 HTTP POST 请求的内部错误 - 500 Internal error from HTTP POST request 使用播放框架通过Gmail SMTP服务器发送电子邮件时出现500内部服务器错误 - 500 Internal Server Error while sending an email via Gmail SMTP server using play framework POST:500内部服务器错误仅在Chrome中 - POST: 500 Internal Server Error only in Chrome HTTP 状态 500 – 从 java 邮件发送邮件时发生内部服务器错误 - HTTP Status 500 – Internal Server Error While sending a mail from java mail 为什么在使用Ajax发送数据时在Struts 2中出现500(内部服务器错误)? - Why I am getting 500 (Internal Server Error) in Struts 2 while sending data using Ajax? 通过Azure Java SDK向服务总线主题发送消息时出现500 Internal Server Error - 500 Internal Server Error while sending a message to a Service Bus topic through Azure Java SDK 为什么我使用 java 后请求响应状态码为 500 的内部服务器错误? - Why do I respond an Internal server error with status code 500 with a java post-request?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM