This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

shell script to LUA
#9
I have the following error, what could it be?, i have also tried ssl.https instead of socket.http, it returns the same error...?
arg: 1
  * nil
* arg: 2
  * string: error:1408F10B:lib(20):func(143):reason(267)
* arg: 3
  * nil


Code:
http = require("socket.http")
ltn12 = require("ltn12")
require('json')

http.TIMEOUT = 5

data = json.encode({
  username = 'user',
  password = 'pasword1234'
})

url1 = 'https://192.168.1.10:8443/api/login'
--url2 = 'https://192.168.1.10:8443/api/s/default/stat/sta'

res, err, hdrs = http.request(url1, data)
log(res, err, hdrs)
Reply


Messages In This Thread
shell script to LUA - by edos - 03.02.2020, 23:31
RE: shell script to LUA - by admin - 04.02.2020, 07:48
RE: shell script to LUA - by edos - 04.02.2020, 18:03
RE: shell script to LUA - by admin - 05.02.2020, 07:31
RE: shell script to LUA - by edos - 05.02.2020, 08:53
RE: shell script to LUA - by admin - 05.02.2020, 09:21
RE: shell script to LUA - by edos - 05.02.2020, 11:30
RE: shell script to LUA - by admin - 05.02.2020, 12:11
RE: shell script to LUA - by benanderson_475 - 23.03.2020, 02:03
RE: shell script to LUA - by admin - 23.03.2020, 07:14

Forum Jump: