Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local attachedMonitor = peripheral.wrap("top")
- while true do
- http.request("https://pastebin.com/raw/VPS8zR5n")
- local requesting = true
- while requesting do
- local event, url, sourceText = os.pullEvent()
- if event == "http_success" then
- local respondedText = sourceText.readAll()
- sourceText.close()
- print(respondedText)
- attachedMonitor.clear()
- attachedMonitor.setCursorPos(1,1)
- attachedMonitor.write(respondedText)
- requesting = false
- elseif event == "http_failure" then
- print("Server didn't respond.")
- requesting = false
- end
- end
- sleep(60)
- end
Add Comment
Please, Sign In to add comment