I am using Lua Nginx module in my nginx server.
I have a Lua script which is execute by init_worker_by_lua_file
in nginx.conf so the script will execute when nginx start and restart.
What the Lua script does is, it request rest api to some server and just retrieve the response.
In this case, I use curl for access the api, is there any way without using curl?
I already try ngx.location.capture
and ngx.exec
those are not work for init_worker_by_lua_file