add simple http test
This commit is contained in:
parent
95818f576b
commit
a8d3f03004
8
dev/tests/network_http.lua
Normal file
8
dev/tests/network_http.lua
Normal file
@ -0,0 +1,8 @@
|
||||
local response_received = false
|
||||
|
||||
network.get("https://api.github.com/repos/MihailRis/VoxelEngine-Cpp/releases/latest", function (s)
|
||||
print(json.parse(s).name)
|
||||
response_received = true
|
||||
end)
|
||||
|
||||
app.sleep_until(function () return response_received end, nil, 10)
|
||||
@ -40,6 +40,6 @@ for i=1,3 do
|
||||
end, "data-sender")
|
||||
end)
|
||||
|
||||
app.sleep_until(function () return complete end, 1000000)
|
||||
app.sleep_until(function () return complete end, nil, 5)
|
||||
server:close()
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user