request help: can i use resty.http in body_filter send http 1.1 request and parse response body #5704
Unanswered
zhangweidongyyl
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Yes, you can do that |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue description
can i use resty.http in body_filter like this
local http = require "resty.http" -- 加载 lua-resty-http 库
httpc, err = http:new() -- 创建 http 连接对象
httpc:set_timeout(time) -- 注意名字里有一个下划线
httpc:set_timeout(connect_timeout, -- 同上
send_timeout, read_timeout)
Environment
apisix version
):uname -a
):nginx -V
oropenresty -V
):curl http://127.0.0.1:9090/v1/server_info
to get the info from server-info API):luarocks --version
):Beta Was this translation helpful? Give feedback.
All reactions