Pira.cz Technical Forum

Magic RDS 4 => Feature Requests => Topic started by: jcmarsalis on January 05, 2024, 08:58:37 pm

Title: need to send via HTTP POST (not HTTP GET)
Post by: jcmarsalis on January 05, 2024, 08:58:37 pm
Hi I am working with DTS Autostage to send our now playing data. The want it as a HTTP POST (not HTTP GET). Can I accomplish this in Magic RDS?
Title: Re: need to send via HTTP POST (not HTTP GET)
Post by: Jan on January 05, 2024, 10:44:47 pm
Before we implement direct solution, you can POST the text like as showed in following example:

Code: [Select]
saveto file:"d:\post.txt"
cmd "curl -k --data-urlencode varname@d:\post.txt https://server.com/input.php"

Enter such script into the Data Distribution box (Edit Connection - Connection Type: internal channel)

Modify the script:
varname is the variable name accepted by your webserver
d:\post.txt can be changed to any local file name in any existing path
https://server.com/input.php is the URL which accepts the POST request

The text coding is UTF-8 by default.
Title: Re: need to send via HTTP POST (not HTTP GET)
Post by: jcmarsalis on January 06, 2024, 03:55:37 pm
Thank you. I've implemented as you described. Will wait to see if they're getting information.
Title: Re: need to send via HTTP POST (not HTTP GET)
Post by: bstapley on February 02, 2024, 05:39:08 pm
If I edit the current connection, won't I "break" the current connection to my encoder?  Also, I don't see the Data Distribution box in my current connection.  Current connection is a Kind = RDS Encoder --> Model = Generic UECP.

Before we implement direct solution, you can POST the text like as showed in following example:

Code: [Select]
saveto file:"d:\post.txt"
cmd "curl -k --data-urlencode varname@d:\post.txt https://server.com/input.php"

Enter such script into the Data Distribution box (Edit Connection - Connection Type: internal channel)

Modify the script:
varname is the variable name accepted by your webserver
d:\post.txt can be changed to any local file name in any existing path
https://server.com/input.php is the URL which accepts the POST request

The text coding is UTF-8 by default.
Title: Re: need to send via HTTP POST (not HTTP GET)
Post by: Jan on February 02, 2024, 06:47:02 pm
The description above does not apply to your existing connection to the RDS encoder.

Add a new Connection, kind: Bridge, connection type: internal channel. This method is also decribed in the Help: ontheweb.pdf