Currently, I am trying to delete a folder that is not empty in sharepoint, in a shared library, I have been looking at other possible solutions in this forum, but none has worked for me, as it was using the activity to delete files or items, and it has not worked in my sharepoint. I have seen that the folder could be deleted via http, with the DELETE method and with the URI _api/web/GetFolderByServerRelativeUrl('Folder') but I get a 400 error.
Another option that I have done is to use the POST method and pass in the header the parameter "X-HTTP-Method": "DELETE", but it didn't work either.
Any other idea that I can try?
Best
You need to provide the relative url to the folder. Just the folder name wouldn't work.
_api/web/GetFolderByServerRelativeUrl('/sites/YourSiteName/YourDocumentLibraryName/FolderName')