Skip to main content
Mar 25, 2013 9:37 AM UTC
Question

How to make an HTTP GET request onPublish?

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

Mar 25, 2013 11:50 AM UTC

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

Translate
Mar 25, 2013 6:47 PM UTC

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()

Translate
Mar 25, 2013 7:27 PM UTC

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.

Translate