http requests

Place to get help with not working mods / modding interface.
Post Reply
proicop
Inserter
Inserter
Posts: 20
Joined: Wed Jul 22, 2020 9:27 am
Contact:

http requests

Post by proicop »

Hello,
I would like to send http request from my mod to some external code on localhost over http. Is that possible? I cant figure out how to inject the lua http library into the game since most of them end up depending on non lua code that I don't think is possible to inject into the game.

Is there http library written in pure lua that I can inject? How do mods like Clusterio communicate?

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: http requests

Post by eradicator »

proicop wrote:
Sun Jun 06, 2021 4:50 pm
Is that possible?
No.
proicop wrote:
Sun Jun 06, 2021 4:50 pm
How do mods like Clusterio communicate?
game.write_file + server commands
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

proicop
Inserter
Inserter
Posts: 20
Joined: Wed Jul 22, 2020 9:27 am
Contact:

Re: http requests

Post by proicop »

What do you mean by server commands?

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: http requests

Post by orzelek »

proicop wrote:
Sun Jun 06, 2021 5:35 pm
What do you mean by server commands?
Server side scripts that work with file that game writes and process them accordingly.
And I'd guess it uses rcon to send info back to game somehow since write file is only output.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: http requests

Post by eradicator »

orzelek wrote:
Sun Jun 06, 2021 6:43 pm
proicop wrote:
Sun Jun 06, 2021 5:35 pm
What do you mean by server commands?
rcon
That.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

proicop
Inserter
Inserter
Posts: 20
Joined: Wed Jul 22, 2020 9:27 am
Contact:

Re: http requests

Post by proicop »

thanks!

Post Reply

Return to “Modding help”