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