小编Joe*_*Joe的帖子

如何在本地启用 SharePoint 2013 REST API 的 JSON 响应?

我使用 SharePoint 2013 本地版本和在线版本进行集成。在访问在线 SharePoint 的 REST API 时,我可以毫无问题地使用application/jsonapplication/xml作为标头。ACCEPT

但是,在访问 SharePoint 2013 本地 REST API 时,我可以使用application/xml作为ACCEPT标头并使用application/json抛出以下错误:

GET - http://xxxxxxx:8300/_api/web/
Header -
Accept:application/json
Response:
{
    "error": {
        "code": "-1, Microsoft.SharePoint.Client.ClientServiceException",
        "message": {
            "lang": "en-US",
            "value": "The HTTP header ACCEPT is missing or its value is invalid."
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

您能否建议我如何获取 LIST、LISTITEM 对象的 JSON 响应?

sharepoint sharepoint-2013 sharepoint-online

1
推荐指数
1
解决办法
1万
查看次数