Unable to get MIME version of a Message using $value

送分小仙女□ 提交于 2021-01-29 16:27:19

问题


I am unable to get MIME for a message using $value like specified in the documentation. How to get MIME?

OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .header("Authorization", "Bearer " + accessToken)
  .url("https://graph.microsoft.com/v1.0/me/messages/k4ZDQ5LTgzMTYtNGZhYS04ZTU3LWZhMjFmZmUzNmE1YwBGAAAAAABzUENX1K4kR6h6KAAA7ENoUb5BySZFX6KemUxNwAAAv_a5nAAA=/?value")
  .build();
Response response = null;
String body;
try {
  response = client.newCall(request).execute();
  body = response.body().string();

回答1:


Your URLs are incorrect, they're using /?value but should be using /$value ($ not ?). The $value is part of the path, not a query param:

https://graph.microsoft.com/v1.0/me/messages/4aade2547798441eab5188a7a2436bc1/$value


来源:https://stackoverflow.com/questions/59562518/unable-to-get-mime-version-of-a-message-using-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!