//Retrieve all of the folders from root Site
function getFolders() {
var executor;
// Initialize the RequestExecutor with the app web URL.
executor = new SP.RequestExecutor(appweburl);
executor.executeAsync({
url: appweburl + "/_api/SP.AppContextSite(@target)/web/getfolderbyserverrelativeurl('/GowthamLibrary')/folders?@target='" + hostweburl + "'",
method: "GET",
headers: {
"Accept": "application/json; odata=verbose"
}, success: FoldersSuccessHandler,
error: FoldersErrorHandler
});
}
im creating app to retrive the folders from Library but im getting error.i think uRL formation is wrong.anyone can help me to fix this?