-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Description
The Changelog states that
within <mount> <on-connect> and <on-disconnect> has been replaced by <event>
, but I can' really find any documentation or examples on that. Currently I'm using the <on-connect> statement to call a script, which issues a curl command to make an API call:
<mount>
<mount-name>/test/mount</mount-name>
<password>xxxxxxxx</password>
<burst-size>65536</burst-size>
<no-yp>1</no-yp>
<on-connect>/on-connect.sh</on-connect>
<on-disconnect>/on-disconnect.sh</on-disconnect>
</mount>
This works perfectly, but I'm trying to do the same thing with the <event> statement.
I've tried the following code, but it does not seem to make any HTTP request to the API endpoint:
<mount>
<mount-name>/test/event</mount-name>
<password>xxxxxxxx</password>
<burst-size>65536</burst-size>
<no-yp>1</no-yp>
<event-bindings>
<event type="url" trigger="source-connect">
<option name="url" value="http://127.0.0.1/api/v1/icecast" />
<option name="action" value="mount_add" />
</event>
<event type="url" trigger="source-disconnect">
<option name="url" value="http://127.0.0.1/api/v1/icecast" />
<option name="action" value="mount_remove" />
</event>
</event-bindings>
</mount>
How can I use <event> to make a HTTP call to the API endpoint at http://127.0.0.1/api/v1/icecast?
Metadata
Metadata
Assignees
Labels
No labels