Facility Control

 View Only
  • 1.  Dashboard - ogscript asyncHTTP question

    Posted 01-13-2025 15:55

    I trying to make a REST api call via ogscript.asyncHTTP but having some issues.

    Trying to make a GET request always seems to be sent as a POST request.

    If I send via CURL or PostMan, a GET to http://192.168.0.151:8080/api/v1/composition/layers/3/clips/3 returns a proper JSON result (from Resolume Arena software).

    If i send via Dashboard, it returns a 405 Method not allowed.

    My test button in Dashboard is calling:

    function callback(result)
       {
          ogscript.debug("ok");
       }

       contentType = "application/json";
       ogscript.asyncHTTP('http://192.168.0.151:8080/api/v1/composition/layers/3/clips/3', 'GET', contentType, "", callback, true);

    Wireshark shows that it is sending as a POST instead of a GET...

    Any suggestions?



    ------------------------------
    Darryl Quinn
    Video Director
    Woodlands Church
    ------------------------------


  • 2.  RE: Dashboard - ogscript asyncHTTP question

    Posted 01-14-2025 04:50

    Hi Darryl,

    The data argument isn't required for GET commands. Leave this as null instead and it should send correctly.

    function callback(result)
       {
          ogscript.debug("ok");
       }
    
       contentType = "application/json";
       ogscript.asyncHTTP('http://192.168.0.151:8080/api/v1/composition/layers/3/clips/3', 'GET', contentType, null, callback, true);



    ------------------------------
    Richard Crutwell
    Ross Video UK
    ------------------------------



  • 3.  RE: Dashboard - ogscript asyncHTTP question

    Posted 01-14-2025 09:22

    Thank you!



    ------------------------------
    Darryl Quinn
    Video Director
    Woodlands Church
    ------------------------------