我有一个足够简单的API请求: https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?$ filter = isRead eq false?$ select = subject,body
但是返回的JSON显示“无效的过滤子句”
我尝试了URL编码(即为空格添加%20):相同的结果
答案 0 :(得分:0)
显然这里有错字,这就是发生此错误的原因:
https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?$filter=isRead eq false?$select=subject,body
^
query options expects '&' instead of '?' as a delimiter
这里是有效的OData URL:
https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?$filter=isRead eq false&$select=subject,body
\_______________________________/\___________________________/ \__________________________________________/
| | |
service root URL resource path query options