使用angular 4服务检索共享点列表数据

时间:2019-07-26 11:28:08

标签: angular sharepoint-2013 sharepoint-list angular4-httpclient

getList(){
  try{
    const headerDict = {
      'Content-Type': 'application/json',
      'Accept': 'application/json;odata=verbose',
      'Access-Control-Allow-Headers': 'Content-Type',
    }    
    const requestOptions = { 
      headers: new HttpHeaders(headerDict), 
    };
  
  return this.http.get("/_api/Web/listsGetByTitle('Testlist')/Items",requestOptions)
  }catch(e){
    console.log(e);
  }
}

错误Access denied. You do not have permission to perform this action or access this resource

0 个答案:

没有答案