MoonScript与Simple.HTTP

作者:糖果

MoonScript调用Lapis的Simple.http,其实调用的就是OpenResty的http的接口。

candylab.moon

http = require "lapis.nginx.http"
body, status_code, headers = http.simple {
    url: 'http://moonscript.cn' 
    method: "GET"
    headers: {} 
}

candylab.lua

local http = require("lapis.nginx.http")
local body, status_code, headers = http.simple({
    url = 'http://moonscript.cn',
    method = "GET",
    headers = { }
})

糖果

糖果
LUA从入门到放弃

服务器大负载情况下客户端出现Connection reset by peer

服务器大负载情况下客户端出现Connection reset by peer Continue reading

Nginx+Lua中文WIKI

Published on March 14, 2019

F5收购Nginx

Published on March 12, 2019