-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DISCUSS]: Use luasocket lib instead of curl
in "bin/apisix"
#2818
Comments
Do you mean writing a new HTTP client based on luasocket? Since lua-resty-http can't be used without |
The luasocket lib already has a HTTP client implementation. |
Hi, @spacewander @tokers, Yeah, luasocket had an HTTP client implementation already. |
But i'm not sure whether it's built in? Or users have to install it before they can use |
Users need to do |
OK, that's good. |
We can make a try. Need to pay attention to the use of different systems(ubuntu, centos and mac os), whether there are compatibility issues. |
Can we specify the path of openresty to solve this problem? So we can use lua-resty-http. |
Do you mean to run the CLI in fake |
yes
Thanks,
Ming Wen
Twitter: _WenMing
YuanSheng Wang <notifications@github.com> 于2020年11月23日周一 下午11:42写道:
… Do you mean to run the CLI in fake openresty ENV? Is it the same as the
"resty" command?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2818 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGJZBK47SYHTQ6E4TJCSUQDSRJ7HDANCNFSM4T6PYCLA>
.
|
There are some limitation in |
Hi, @moonming, I think there is no need to use What's your opinion about using |
Hi, I advise using luasocket lib instead of
curl
in "bin/apisix".Although, it's very convenient to get HTTP responses by using "io.open" and "curl".
But, I think it's not an elegant way and has some limitations. Such as can't distinguish error info between
Connection refused
and empty response.So I think we can use luasocket lib and create a common function in "cli/util.lua", so that we can deal with some HTTP request better in "bin/apisix".
releated: #2718
The text was updated successfully, but these errors were encountered: