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
It is not related to the username and password.
It returns a html page with JavaScript that redirects the browser to login.htm. Enable the browser developer tools and monitor the network tag. You will see it.
OkHttpUtils2 doesn't execute the JavaScript. Maybe you need to send the request to login.htm directly.