Webserver commands only works ONCE?

Post your questions here and we'll all try to help.
Post Reply
Hakol.Sound
Posts: 11
Joined: Sun Jan 13, 2019 12:31

Webserver commands only works ONCE?

Post by Hakol.Sound »

Hi folks
Can you think of a reason why Post requests only work for the first time for each parameter?
While sending to th webserver a command, only the first time hits for eample:
curl -X POST "http://192.168.0.180:8080/api/v1/compos ... /2/connect" -H "accept: */*" -H "Content-Type: application/json" -d "true"

Will connect to the second column after resolume restart but wont connect if executed again until next restart with this respose:

Code Description Links
204
OK

No links
404
The requested column does not exist

When obviously the media exists.

Thanks oin advance.

martijn
Team Resolume
Posts: 5
Joined: Wed Nov 25, 2020 09:01

Re: Webserver commands only works ONCE?

Post by martijn »

Hey Hakol,

I think I know what's going wrong. If you look at the documentation for the connect call you will see that the input you give it is interpreted as whether the mouse button is pressed on the column.

Since you didn't mention it, I think you are not also sending a request with "false" as the input, so Arena/Avenue thinks the mouse button is continuously pressed on the column. You need to either send this response as well, or you need to simply omit the input data, in which case it will act as if you sent both a request with "true" and a request with "false".

Hakol.Sound
Posts: 11
Joined: Sun Jan 13, 2019 12:31

Re: Webserver commands only works ONCE?

Post by Hakol.Sound »

Yup thats it!
It works if I send another command with "false" and send the orogonal on again.
What do you mean by 'omit'? How can it be done with one command?

martijn
Team Resolume
Posts: 5
Joined: Wed Nov 25, 2020 09:01

Re: Webserver commands only works ONCE?

Post by martijn »

If you don't send an empty body with the request (so you send neither a true or false), it is internally interpreted as if you sent two requests, one with true and one with false immediately after it.

Post Reply