LuaComputers Release 0.3!

in #programming7 years ago

Soo after a bit of testing around and watching some indian YouTubers explain HTTP requests in Java I finally got the HTTP API to work.

I only tested a GET request to this script:

<?php
        if(isset($_GET['email'])){
                $email = $_GET['email'];
                $password = $_GET['password'];
                echo "your email is $email and your password is $password";
        }
?>

You can issue a http request with
local id = _http.send("GET", "some_url")
As you can see, the function returns the id of the request as it is asynchronous. Which means that the system automatically puts the response into the event queue. The event is called "http_response" and has 2 parameters: the id of the request and the actual message.

Hope you guys like the implementation!


GitLab Repo
Direct Download
Check out my WIP operating system for LuaComputers!
Follow me on Twitter!