mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 11:03:12 +00:00
17 lines
332 B
Lua
17 lines
332 B
Lua
local skynet = require "skynet"
|
|
local httpc = require "http.httpc"
|
|
|
|
skynet.start(function()
|
|
print("GET baidu.com")
|
|
local header = {}
|
|
local status, body = httpc.get("baidu.com", "/", header)
|
|
print("[header] =====>")
|
|
for k,v in pairs(header) do
|
|
print(k,v)
|
|
end
|
|
print("[body] =====>", status)
|
|
print(body)
|
|
|
|
skynet.exit()
|
|
end)
|