ROBLOX allowing users to perform Http requests was a huge improvement to the platform. However, ROBLOX skipped the implementation of two very important HTTP methods - PUT and DELETE. A lot of modern day Web APIs use these methods to update and delete data, instead of adapting to GET/POST. An alternative could be to implement a web server to handle these requests for you, but not everyone can afford a reliable web server.
Information about the methods:
These methods wouldn’t be very hard to implement, and would allow interaction with most modern APIs. (Excluding those requiring modification of a header)
I’m trying to implement an endpoint DELETE /items/<id>, then I realised Roblox doesn’t support REST properly so I had to make it POST /items/<id>/delete. I hope some people can imagine how horrible I’m feeling that I had to implement it that way.
Hm, I was going to post that it’d be complicated / work that I shouldn’t have to do, but apparently it’s just a one-liner for the framework I’m using. Guess I should be less pessimistic
Based on a quick Google search, I’m pretty sure this method requires the third-party API’s web server to support using this method, as it doesn’t appear to be enabled by default. I’ve been looking into various ways to be able to perform other http requests, and have tried to use X-Http-Method-Override in the past with only little success. Either I’m doing it wrong (which could be entirely possible, but doubt it since its fairly easy), or Servers aren’t configured to support it by default, thus why I request ROBLOX to support adding this feature on another thread: Table HttpService:RequestAsync(table request)
I really like the idea of having a “table” which we can build the request on, and I think would improve ROBLOX games drastically by allowing them to be able to integrate third-party services by being able to properly interface with them.
Yes, the service has to support the header(s) specifically. Maybe also try if “X-HTTP-Method” or “X-Method-Override” works instead for the service you’re trying to access, since I’ve seen those variations used a few times.
I’d like to resurrect this thread - I’m a web n00b so the easier it is to support third party backends the better for me. I’d like to use Google Firebase’s REST api and believe I could do it fairly easy if we had PUT and DELETE, though I’m not 100% sure - maybe we’d need the headers for authorization?