Currently struggling to delete a file from Box in Node.js. I'm using the request module. The docs state that to delete a file, you must use the "delete" method. However, I'm getting a status 405 "method not allowed. I've already validated that req.body.id contains the correct information. Here's my code:
<div id="co"> <!-- no onclick method needed -->
<script>
$(document).ready(function() {
$("#co").click(function() {
$("body").css("background-color","blue"); //edit, body must be in quotes!
});
});
</script>
Any idea why I'm getting this error?
答案 0 :(得分:0)
And I'm an idiot. Url should be: "https://api.box.com/2.0/files/". I had https://upload.box.com/api/2.0/files/".