13.03.2023, 12:36
Hi,
I´ve tried to get snapshot with socket http request
And response is:
If I put this url in explorer it works.
Thanks
I´ve tried to get snapshot with socket http request
Code:
function SnapshotCamaraIP2()
local IP = "192.168.1.100"
local UrlCamara = 'http://user:pass@'..IP..'/ISAPI/Streaming/channels/101/picture'
local response
require('socket.http')
socket.http.TIMEOUT = 5
response,err = socket.http.request(UrlCamara)
log(response,err)
return response
end
And response is:
Code:
* arg: 1
* string: <!DOCTYPE html>
<html><head><title>Document Error: Unauthorized</title></head>
<body><h2>Access Error: 401 -- Unauthorized</h2>
<p>Authentication Error</p>
</body>
</html>
* arg: 2
* number: 401
If I put this url in explorer it works.
Thanks