【发布时间】:2018-09-15 16:08:26
【问题描述】:
我正在使用 SharePoint 2013 onprem 和在线版本进行集成。在访问在线 SharePoint 的 REST API 时,我可以毫无问题地使用 application/json 和 application/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."
}
}
}
您能否建议我如何获取 LIST、LISTITEM 对象的 JSON 响应?
【问题讨论】:
标签: sharepoint sharepoint-2013 sharepoint-online