Update linkedGet.lua

This commit is contained in:
erius0 2021-01-08 02:57:07 +03:00 committed by GitHub
parent 23e44639ed
commit 23fa723a74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,16 @@
local event = require("event") local event = require("event")
local keyboard = require("keyboard") local keyboard = require("keyboard")
local component = require("component") local component = require("component")
local internet = require("internet")
local tunnel = component.tunnel local tunnel = component.tunnel
while true do while true do
local _, _, _, _, _, message = event.pull("modem_message") local _, _, _, _, _, message = event.pull("modem_message")
print(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!") tunnel.send("succes!")
end end