Allow us to cancel active Http requests

As a Roblox developer, it is currently too hard to cancel a request before its got a response.

I found out recently that this is quite a common thing in HTTP libraries, yet Roblox provides no developer accessible way of cancelling an active request.

This is a useful feature for users of Promises or my Action class, both of which implement a Cancel method, but the request cant actually cancel if its called on the request.

Lets assume we’re fetching a large response body, for this example, 60MB, and we want to give up on it half way through, because I cant cancel the request, the remaining data will be downloaded, and will be sent to nowhere, this uses up unneccessary bandwidth.

If Roblox is able to address this issue, it would improve my development experience because I could cancel requests, especially large ones, mid transmission

10 Likes

I don’t see a very important use for this maybe I am crazy

Roblox only allows you to have 3 in-flight http requests (from HttpService) at one time so cancelling long-awaiting requests could be quite helpful for many developers who end up having requests take way longer than expected. Note: This is allegedly expanded to 16 in a live game server.

3 Likes

Is this documented or mentioned anywhere? The only constraint I’m aware of with HTTP service is 500 requests a minute

This is undocumented on the creator docs but is confirmed to be the case here, the limit is apparently 16 in a live game-server via independent tests from other developers.

1 Like