YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
11 stars 4 forks source link

HTTP default timeout? - Add option to establish timeouts to HTTP calls. #5744

Open AIO1 opened 2 weeks ago

AIO1 commented 2 weeks ago

Is your feature request related to a problem?

No

Describe the solution you'd like

In GMS http don't seem to have a timeout? or at least indicated in the manual that I can find... It would be nice to have an additional optional argument for all http functions that serves as a timeout.

Basically if no argument is given, the http will end at a default (1 min for example) If the argument is given, is the time in milis to trigger a timeout if no responde is given, so for example:

http_get("URL", 10000) --> This would mean than GMS will try to wait 10 secs to that (async) and if no response is given, it would then in the networking even, in the async_load map contain a new entry that will indicate that it has been casued by a timeout.

Something like this could be great for making it easier to handle HTTP timeouts. Its a configuration that is set indvidually to each http call done.

Also it could exist a global http timeout that can be modified and it will only affect those http calls that don't have the timeout argument specified.

Describe alternatives you've considered

No response

Additional context

No response