Page 1 of 1

http requests

Posted: Sun Jun 06, 2021 4:50 pm
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?

Re: http requests

Posted: Sun Jun 06, 2021 5:30 pm
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

Re: http requests

Posted: Sun Jun 06, 2021 5:35 pm
by proicop
What do you mean by server commands?

Re: http requests

Posted: Sun Jun 06, 2021 6:43 pm
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.

Re: http requests

Posted: Sun Jun 06, 2021 10:40 pm
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.

Re: http requests

Posted: Mon Jun 07, 2021 5:38 pm
by proicop
thanks!