23.03.2020, 02:03
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
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)