I've tried to use it in Resident script (of course without <?) but it returns below error:
Resident script:2: attempt to call global 'getconfig' (a nil value)
stack traceback:
I've used your solution and now I send get request to .lp file but interesting thing is that I must fill also login and password when I try to connect localhost(this is from demo machine):
Resident script:2: attempt to call global 'getconfig' (a nil value)
stack traceback:
I've used your solution and now I send get request to .lp file but interesting thing is that I must fill also login and password when I try to connect localhost(this is from demo machine):
Code:
http = require "socket.http"
result = http.request("http://admin:admin@127.0.0.1/user/long&lat.lp")
longitude, latitude = result:match('(%d*.%d*),(%d*.%d*)')
longitude, latitude = tonumber(longitude), tonumber(latitude)
log(longitude, latitude)