Just rechecked, I think the $response of [:] indicated no response. I use this to check my NAS is running, if I get this response when trying to access its admin page, it indicated the NAS is down.
Are you just using the ip address or http://? I only use the ip. You should see the servers response in $response even if its an error message.
I’m not sure if the invalid ternary operator errors are causing any issues. It might be worth writing a simple piston to check just the web call and posting it, along with the log.