Skip to content

Commit

Permalink
Merge pull request #256 from luvit/features/improve_http_module
Browse files Browse the repository at this point in the history
http: module refactor
  • Loading branch information
rphillips committed Jun 26, 2012
2 parents 7fbdb5a + 9c3d881 commit bf2d046
Show file tree
Hide file tree
Showing 10 changed files with 977 additions and 163 deletions.
10 changes: 5 additions & 5 deletions examples/http-client.lua
@@ -1,14 +1,14 @@
local http = require('http')

http.request({
local options = {
host = "luvit.io",
port = 80,
path = "/"
}, function (res)
}

local req = http.request(options, function (res)
res:on('data', function (chunk)
p("ondata", {chunk=chunk})
end)
res:on("end", function ()
res:close()
end)
end)
req:done()

0 comments on commit bf2d046

Please sign in to comment.