使用已经安装的 openresty 安装 resty.http

Install resty.http with already installed openresty

我安装了 openresty-1.13.6.1 但它缺少 'resty.http' 模块。我的 openresty 安装在 /usr/local/openresty 中,我需要将 resty.http 模块与其集成。怎么做?

只需将两个文件 (https://github.com/pintsized/lua-resty-http/tree/master/lib/resty) 复制到 /usr/local/openresty/lualib 文件夹中。

更新:

生成的文件结构应为:

/usr/local/openresty/lualib/resty/http.lua
/usr/local/openresty/lualib/resty/http_headers.lua