Hi
Where I have to enter the return so my function returns true.
I need help.
My print (statusVU ()) is always nill i need the return or vareanle with response.status.
function statusVU()
local vuStatusAus
getURL = 'http://192.168.11.33:80/web/powerstate'
putURL = 'http://192.168.11.33:80/web/powerstate'
local httpClient = net.HTTPClient()
httpClient:request(getURL, {
success = function(response)
if response.status == 200 then
httpClient:request(putURL, {
success = function(response)
if response.status == 200 then
return true
end
end,
error = function(err)
end,
options = {
method = 'PUT',
data = response.data
}
})
else
end
end,
error = function(err)
end,
options = {
method = 'GET'
}
})
end
print(statusVU())