This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
EveryOS's profile picture

Alternatives to HTTP API

Started by EveryOS, 07 April 2016 - 06:00 PM
EveryOS #1
Posted 07 April 2016 - 08:00 PM
I like the HTTP API and all, but that only communicates with world wide web servers. While I no it's not good to tamper with your internet, even digitally, I would like to know: Is there an alternative to the HTTP API that will allow me to tell it to send specific bit packets to non-www servers and receive bit packets.
Bomb Bloke #2
Posted 08 April 2016 - 10:53 AM
Nope.
DannySMc #3
Posted 09 April 2016 - 12:09 AM
No it isn't possible, BUT you can use another programming language to do this for you and use PHP, or another language if you'd prefer.

An example workflow:

CC -> Web Server -> PHP file -> Does whatever you want it to do (connecting to another server, or doing something else) -> Returns it back to the PHP file -> Returns it back to the CC computer.

Of course this is a little more done via PHP, up to you really, and then you could use http.request() to then allow you to catch the return asynchronously, which would stop it blocking your current program.