Fixed deletion of files & directories and properly all the other POST requests

- sending correct accept headers
- sending the query in the request body for posts requests