-
-
Save creationix/b2d25456345f88f74dec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local http = require('coro-http') | |
local split = require('coro-split') | |
coroutine.wrap(function () | |
split(function () | |
for i = 1, 200 do | |
local req, body = http.request("GET", "http://luvit.io/") | |
p(req.code, req.keepAlive, #body) | |
end | |
end, function () | |
for i = 1, 200 do | |
local req, body = http.request("GET", "https://luvit.io/") | |
p(req.code, req.keepAlive, #body) | |
end | |
end) | |
p((http.request("GET", "http://luvit.io/"))) | |
p((http.request("GET", "https://luvit.io/"))) | |
end)() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment