Skip to main content
1 of 3
Admin
  • 900
  • 12
  • 33

I am getting error when I fetch the sharepoint site 401 (Unauthorized) in Google Chrome?

When I Get the document list from sharepoint site I get this error" 401 (Unauthorized)" only in Google Chrome but in IE it work. This is my code

function GetListItems() {
var siteURL = "http://localhost:8032/_api/web/GetFolderByServerRelativeUrl('Data%20Do')/File";
            return $.ajax({
                url: siteURL,
                async: false,
                method: "GET",

                headers: {
                    "Accept": "application/json;odata=verbose",
                }
            });
        }
Admin
  • 900
  • 12
  • 33