127.0.0.1:8000/press/bank/<page>/<button> not working anymore #2790
-
I have been using the script below in vMix to remotely control Companion. However, it has stopped working since I updated to V3.2 Dim client As WebRequest = WebRequest.Create("http://127.0.0.1:8000/press/bank/1/1" ) I suspect that the 'press bank' command has been changed. Could you please advise on the updated script I should use now? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There is a new api you could use, but the old api does still work. It is disabled by default in new installations of companion, so check the companion settings |
Beta Was this translation helpful? Give feedback.
-
Thanks, I enabled 'Deprecated HTTP API' and it works again. ChatGPT wrote this for me for the new api: Dim request As HttpWebRequest = DirectCast(WebRequest.Create("http://127.0.0.1:8000/api/location/1/1/1/press"), HttpWebRequest) Dim response As String = New StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd() It works, but is this the best way to do it? |
Beta Was this translation helpful? Give feedback.
Thanks, I enabled 'Deprecated HTTP API' and it works again.
ChatGPT wrote this for me for the new api:
Dim request As HttpWebRequest = DirectCast(WebRequest.Create("http://127.0.0.1:8000/api/location/1/1/1/press"), HttpWebRequest)
request.Method = "POST"
Dim response As String = New StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd()
Console.WriteLine("API Response: " & response)
It works, but is this the best way to do it?