# HG changeset patch # User Nobuyasu Oshiro # Date 1369754131 -32400 # Node ID 30b09b383f4e34d91d3173842fef6dde18ce1e6e # Parent 24fc70a8df95dd1ee28d5a3475473229adf6fdf5 add bullet.lua diff -r 24fc70a8df95 -r 30b09b383f4e http/bullet.lua --- /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