and_cesbo icon

Astra WebSocket client

and_cesbo | PRO | 08/20/15 04:57:50 PM UTC | 0 ⭐ | 744 👁️ | Never ⏰ | []
Lua |

440 B

|

None

|

0 👍

/

0 👎

http_request({
    host = "127.0.0.1",
    port = 8000,
    path = "/control/event/",
    headers = {
        "Origin: http://127.0.0.1:8888",
        "Upgrade: websocket",
        "Connection: Upgrade",
    },
    callback = function(request, response)
        if type(response) == "table" then
            request:send(json.encode({scope = "auth"}))
            return nil
        end
        table.dump(json.decode(response))
    end
})

Comments