LuaScripts/linkedGet.lua
2021-01-08 02:57:07 +03:00

16 lines
506 B
Lua

local event = require("event")
local keyboard = require("keyboard")
local component = require("component")
local internet = require("internet")
local tunnel = component.tunnel
while true do
local _, _, _, _, _, message = event.pull("modem_message")
local result = ""
local handle = internet.request("http://worldtimeapi.org/api/timezone/Europe/Moscow")
for chunk in handle do
result = result..chunk
end
local mt = getmetatable(handle)
print(result..message)
tunnel.send("succes!")
end