I can run this get request in my browser to trigger outlets on a power conditioner:
but in the B4a log console I get an html login page instead of the expected response:
and expected response:
This is what I tried so far:
but in the B4a log console I get an html login page instead of the expected response:
and expected response:
<?xml version="1.0"?>
<request>
<outlet_status>0,0,0,1,1,0,0,0,0,0,0,0</outlet_status>
<auto_reboot>0</auto_reboot>
</request>
This is what I tried so far:
B4a Code:
Sub Button_AllOff_Click
Dim j As HttpJob
j.Initialize("", Me)
j.Username=""
j.Password=""
'j.Download("http://192.168.1.185/control.cgi?outlet=0&command=0")
'j.Download2("http://192.168.1.185/control.cgi", Array As String ("outlet","0","command","0"))
Wait For (j) jobdone (j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
End Sub