✓ Accepted answer
Perhaps this can help, from your linked docs: https://developers.trello.com/reference/#delete-card
var data = null;
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("DELETE", "https://api.trello.com/1/cards/id");
xhr.send(data);
This is the javascript called. Then if we look at:
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open
we see
Syntax
XMLHttpRequest.open(method, url)
method
The HTTP request method to use, such as "GET", "POST", "PUT", "DELETE", etc. Ignored for non-HTTP(S) URLs.
url
A DOMString representing the URL to send the request to.
So that leaves you with the following problem. Roblox only has PostAsync and GetAsync, the delete request from the REST api is not implemented. See here:
https://devforum.roblox.com/t/http-put-and-delete/11575/2
In the above board, people suggest you set the DELETE request through the URL, and indeed, the REST api should allow you to do anything through a POST request, including a DELETE request. I guess if nothing else works out you could always set up a php script somewhere that does the DELETE request for you when you POST to it from Roblox.
Hope this helps you out! Good luck!
2 comments
Thanks for the help ill look into setting up a php.
Was Wondering if you ever got this working i've been trying to and keep getting stuck. If you got it working would you be willing to tell me how?