HttpService Additional RESTful Methods

Roblox currently lacks any additional RESTful methods for HttpService other than GET and POST which makes using many third-party APIs impossible for developers. This is quite irritating as any developer who might require these methods would instead have to pay for the use of a server. Paying for a server might not be too difficult for developers that make money through DevEx, but for the average Roblox developer the cost is too intimidating even if it is just a few dollars a month. Additionally, many of these developers may not know how to set up their server to work with HttpService requests.

If Roblox were to support additional RESTful methods, such as DELETE and PUT, this would allow developers to do such things as update a trello board(including deleting cards, moving cards, etc.) and updating/deleting Discord and Trello webhooks directly from their game automatically. This can prove to be very useful for keeping track of live statistics and events in your game and would be a much more efficient replacement to using Data stores to keep track of data that is needed instantaneously.

I realize this has been requested before, but it’s been almost 2 years and we still haven’t heard if this is something that may be added. I feel like it definitely should as it would make HttpService much more useful.

23 Likes

Just use X-HTTP-Method-Override

Except I have yet to see any webservice actually caring for that header (Discord and Trello doesn’t).

Do you have any actual examples where this header is considered by the webservice?
Not even ROBLOX considers this header on their endpoint http://api.roblox.com/ownership/hasasset?userId=1&assetId=1818 (sending a POST, but overriding it to a GET)

1 Like

Trello requires DELETE/PUT for some specific actions which it doesn’t allow POST.

i.e DELETE => Removing a card/label from a card
i.e PUT => updating webhook, adding members to board, etc…

To bypass this, I just either use X-HTTP-Method-Override (as VR_Service said)

OR send it to a php document which will handle the request for me.

I’ve been trying to get Redirecter to work with X-HTTP-Method-Override, but haven’t had any luck, as GetAsync would just give me the contents of the card, and PostAsync would error.

edit: tried both shortlink & id - neither worked.

print(http:GetAsync(
    "https://api.trello.com/1/cards/" .. cardShortLink ..
    "?key=" .. apikey .. "&token=" .. token ..
    "&desc=" .. http:UrlEncode(newDescription), false,
    {["X-HTTP-Method-Override"] = "PUT"}
))

This has been the call I’ve made - there isn’t much to change here, so I’m wondering how you’ve done it, or what might be wrong with the code snippet above.