https://192.168.1.90/httpapi.asp?command=setPlayerCmd:onepause will play or pause the device.
Works fine in a browser as I can just bypass the untrusted certificate error... however, writing an Autohotkey script that disregards the certificate errors and simple sends the request has proven difficult for a programmer at my level. I know how to do this with unsecure HTTP, but I can't figure out for HTTPS.
My question is: what's the simplest way I could perform a POST from my PC to the URL above, without going through external processes of self-signed certificates and such. I just want ahk to Ignore the fact that its an untrusted connection. This script will only ever be used within my four walls by me, so security and best practices aren't extremely important in this particular situation.
I have done some Google searching have have yet to find a simple, self-contained example. Below is my latest failed attempt-- it doesn't generate an error, it just doesn't actually work.
Thank you in advance to anybody that can point me in the right direction.
Code: Select all
$url := "https://192.168.1.90/httpapi.asp?command=setPlayerCmd:onepause"
$oHTTP = ObjCreate("Winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", $url, False)
$oHTTP.SetRequestHeader("Authorization", "Basic" & " " & $auth)
$oHTTP.setRequestHeader("Content-type", "text/uri-list")
$oHTTP.Send()
$responseText = $oHTTP.ResponseText
$responseStatus = $oHTTP.Status