I am able to retrieve list and list items just fine:
var client2 = new RestClient("https://preactdk.sharepoint.com/sites/mysite/_api/web/lists/getbytitle('mylist')/items");
client2.Timeout = -1;
var request2 = new RestRequest(Method.GET);
request2.AddHeader("Authorization", $"Bearer {tokenData.access_token}");
request2.AddHeader("Accept", "application/json;odata=verbose");
IRestResponse response2 = client2.Execute(request2);
However, when I try to retrieve the file within "Documents" in the "testfolder" directory via _api/web/GetFolderByServerRelativeUrl('testfolder/asdf.txt')/Files
I get the following result:
{
"d": {
"results": []
}
}
What exactly am I doing wrong?
I wish to retrieve the URL of the asdf.txt
file & then download it.