Skip to main content
March 25, 2013
Question

How to make an HTTP GET request onPublish?

  • March 25, 2013
  • 1 reply
  • 682 views

Hey guys,

Running in to a little issue. I need to make a GET request to my API to notify it that a stream is being published, but I'm having trouble geting this to work. I tried URLRequest/URLLoader, but I assume those can't be used. Any input would be greatly appreciated!

This topic has been closed for replies.

1 reply

March 25, 2013

Hi,

You can use LoadVars class to make HTTP requests on the server side. For more details about LoadVars class, you can check the following link:

http://help.adobe.com/en_US/adobemediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7ff7SSASLR.2.3.html

March 25, 2013

Thanks for the answer.

var my_lv = new LoadVars();

my_lv.server = "east3";

my_lv.pp = newpoint;

my_lv.type = 2;

my_lv.send("http://api.mydomain.com/r.php", "_blank", "GET");

is this incorrect? It doesn't seem to be calling that script when adding to onPublish()

March 25, 2013

Great. using .load() seemed to work. My next question would be how to create a 10 second timer, to load that url every 10 seconds, I couldn't find any timer classes.