Update linkedGet.lua
This commit is contained in:
parent
23e44639ed
commit
23fa723a74
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue