add httpc

This commit is contained in:
Cloud Wu
2014-08-04 18:06:16 +08:00
parent 7beed39b1d
commit dec2e6fe4c
5 changed files with 276 additions and 130 deletions

View File

@@ -39,6 +39,11 @@ skynet.start(function()
table.insert(tmp, string.format("query: %s= %s", k,v))
end
end
table.insert(tmp, "-----header----")
for k,v in pairs(header) do
table.insert(tmp, string.format("%s = %s",k,v))
end
table.insert(tmp, "-----body----\n" .. body)
response(id, code, table.concat(tmp,"\n"))
end
else