dpa*_*ark 2 scribe microsoft-graph
我从Microsoft Graph API收到的错误是
error = {
"code": "BadRequest",
"innerError": {
"date": "2017-04-10T19:37:08",
"request-id": "973641dd-b150-4406-9f3b-fbcf6f7e5aa1"
},
"message": "The MIME type 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2' requires a '/' character between type and subtype, such as 'text/plain'."
}
Run Code Online (Sandbox Code Playgroud)
使用POSTman时,我可以从端点https://graph.microsoft.com/v1.0/me/contacts成功获取信息,但是转到scribe-java库OAuthRequest时,我收到此错误。
我的请求将转到带有2个标题的URL https://graph.microsoft.com/v1.0/me/contacts。授权->承载[令牌]
内容类型-> application / json
尝试在您的请求中显式设置“ Accept”标头。POSTman可能默认将您设置为[Accept = text / html,image / gif,image / jpeg,*; q = .2,/ ; q = .2]
小智 5
您好,当我尝试使用图形 api 在 AzureAD 上创建新用户时,我遇到了同样的错误。我解决了我的问题,我将接受标头更改为“Accept”:“text/html,application/json”。供你参考
归档时间: |
|
查看次数: |
1466 次 |
最近记录: |