Home / Forum / Discussion and Help for Gmod-Glua-Lua / How to fix HTTP failed - ISteamHTTP isn't available! on Gmod

How to fix HTTP failed - ISteamHTTP isn't available! on Gmod

Thread
profile avatar Jenny Fer
⚗️ Support
📖 Posts: 31
↩️ Replies: 42
❤️ Reactions: 18
Jenny Fer Posted 1607808646 (1516 views)

If you are there then you have this problem HTTP failed - ISteamHTTP displayed in your console. I explain here the simple solution to solve it and why it happens.



The known error looks like this in your Gmod server console :

[ERROR] HTTP failed - ISteamHTTP isn't available!


1. httpF - lua/includes/modules/http.lua:27
2. server_data_load - gamemodes/darkrp/gamemode/requestsl.lua:659
3. unknown - gamemodes/darkrp/gamemode/requestsl.lua:709
4. include - [C]:-1
5. unknown - gamemodes/darkrp/gamemode/init.lua:32


Why does HTTP fail?



The HTTP module initialised here > lua / includes / modules / http.lua in the garrysmod folder of your server,
is simply not yet initialized at the time a function calls for it. The solution is not to launch it immediately. I know that sometimes for security reasons you will want to launch it as soon as possible and fortunately there is the most optimized and quickest method is to place in a timer.simple at 0 seconds, the function that calls the HTTP function often used by http.Fetch and http.Post. It should look like this :

Timer.Simple( 0 , function()


http.Fetch("url")

end)


Do not use hook.Add for safety and performance reasons.



Attention for reasons of optimization do not use hook.Add, we will not add a permanent hook just for that it is ridiculous, that could duplicate the launching of a function if badly used. The goal is to serve as soon as possible, not as late as possible and not several times for nothing, there your security is put at risk, because if your broken product allows to block malicious scripts, they could be launched before the activation of your script, so launching it as soon as the server is ready is more important.

For security reasons do not use hook.Add, which can be easily overwritten and may simply break your code, if it is a security addon, security is compromised. Hence the importance of not installing anything on the workshop that can be updated without your knowledge on your server, check everything! If you miss something, don't hesitate to ask the creator. Except elsewhere, they are usually happy to explain it to you.

Solution ultime ?


Buy your scripts where support is mandatory.

If I have done you a favour please write me a little message as a comment or put a little heart, I do this for free and it's always nice to know that I helped.
⛔️ Sorry, you are not connected, join to leave a reaction

Replies


Sign in or register to reply