HISE Logo Forum
    • Categories
    • Register
    • Login

    Server.callWithPOST callback not triggered

    Scheduled Pinned Locked Moved Newbie League
    5 Posts 3 Posters 33 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      daniloprates
      last edited by daniloprates

      I'm trying to use Server.callWithPOST, but the callback is not triggered and no errors presented. What could be wrong? Is there a way I can debug it?

      local url = 'https://webhook.site/d3168142-e543-4136-ace6-f17a7f0381e5';
      
      local payload = {
          "test": 123,
      };
      
      Server.callWithPOST(url, JSON.stringify(payload), function(status, response) {
          Console.print(status);
          Console.print(response);
      });
      
      d.healeyD ustkU 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @daniloprates
        last edited by

        @daniloprates Are you calling this from a button callback?

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        D 1 Reply Last reply Reply Quote 0
        • D
          daniloprates @d.healey
          last edited by

          @d-healey it was missing setBaseURL

          Not it worked:

          Server.setBaseURL("https://webhook.site");
          local url = '/d3168142-e543-4136-ace6-f17a7f0381e5';
          local payload = {
              "test": 123,
          };
          Server.callWithPOST(url, payload, function(status, response) {
              Utils.cl(status);
              Utils.cl(response);
          });
          
          ustkU 1 Reply Last reply Reply Quote 1
          • ustkU
            ustk @daniloprates
            last edited by

            @daniloprates You want to set the base URL first:

            Server.setBaseURL("https://webhook.site");
            
            local url = '4df64496-5ed1-4c08-94fe-3f894537b369';
            		
            local payload = {
                "test": 123,
            };
            
            Server.callWithPOST(url, payload, function(status, response) {
                Console.print(status);
                Console.print(response);
            });
            

            Hise made me an F5 dude, browser just suffers...

            1 Reply Last reply Reply Quote 1
            • ustkU
              ustk @daniloprates
              last edited by

              @daniloprates It appears you found it already ☺

              Hise made me an F5 dude, browser just suffers...

              1 Reply Last reply Reply Quote 1
              • First post
                Last post

              21

              Online

              2.0k

              Users

              12.8k

              Topics

              111.0k

              Posts