Mercurial > hg > Members > nobuyasu > Lua
changeset 3:30b09b383f4e
add bullet.lua
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 29 May 2013 00:15:31 +0900 |
parents | 24fc70a8df95 |
children | 06f22f0d9cab |
files | http/bullet.lua |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/http/bullet.lua Wed May 29 00:15:31 2013 +0900 @@ -0,0 +1,20 @@ +local io = require("io") +local http = require("socket.http") +local ltn12 = require("ltn12") + +local bulletURL = "http://localhost:8080/createBoard?bname=hello%20world&author=oshiro&key=0&msg=hogehoge" + +b, c, h = http.request +{ +-- url = bulletURL, + url = "http://www.google.com", + method = "GET", +-- method = "POST", + sink = ltn12.sink.file(io.stdout) +} + +print("") +print("b = "..b) +print("c = "..c) + +for i,v in pairs(h) do print(i,v) end