Trouble using EXEC_SEND_HTTP_POST with credentials
Trouble using EXEC_SEND_HTTP_POST with credentials
Hi,
I can't find a way to use EXEC_SEND_HTTP_POST correctly ...
It works without credentials, but when I add credentials, i got "Error : HTTP web request failed"
I tryed like this :
EXEC_SEND_HTTP_POST user|password|http://server.com/myuri|var=value&var2=value2
If anyone got an idea ?
Thank a lot
I can't find a way to use EXEC_SEND_HTTP_POST correctly ...
It works without credentials, but when I add credentials, i got "Error : HTTP web request failed"
I tryed like this :
EXEC_SEND_HTTP_POST user|password|http://server.com/myuri|var=value&var2=value2
If anyone got an idea ?
Thank a lot
Re: Trouble using EXEC_SEND_HTTP_POST with credentials
If it works without credentials, it indicates, that your server doesn't support them. So why do you add them then?
E.g. you only need credentials, if your server requires them, e.g. in a SSL/TLS environment when using https://...!
Another option when such an error occurs is, that the credentials are invalid.
E.g. you only need credentials, if your server requires them, e.g. in a SSL/TLS environment when using https://...!
Another option when such an error occurs is, that the credentials are invalid.
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
Re: Trouble using EXEC_SEND_HTTP_POST with credentials
We used this server and credentials on our previous system without problem.
When I say, "it work without credentials" it's just that i got a response from server (requesting me for login/password).
Strange...
When I say, "it work without credentials" it's just that i got a response from server (requesting me for login/password).
Strange...
Re: Trouble using EXEC_SEND_HTTP_POST with credentials
What are the exact specifications of your server or API?
EXEC_SEND_HTTP_POST uses the content type "application/x-www-form-urlencoded" and provides the username:password as 'Basic' encoding in the header of the web requet (pre-authentication) and supports TLS1.1, 1.2 and 1.3.
EXEC_SEND_HTTPPOSTPLAIN doesn't provide and special content type and posts the content as plain text.
Maybe also need to use EXEC_SEND_HTTP_GET which uses a simple web request?
EXEC_SEND_HTTP_POST uses the content type "application/x-www-form-urlencoded" and provides the username:password as 'Basic' encoding in the header of the web requet (pre-authentication) and supports TLS1.1, 1.2 and 1.3.
EXEC_SEND_HTTPPOSTPLAIN doesn't provide and special content type and posts the content as plain text.
Maybe also need to use EXEC_SEND_HTTP_GET which uses a simple web request?
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
Re: Trouble using EXEC_SEND_HTTP_POST with credentials
No idea, it's not in the system doc...
Just this :
API Usage
In order to use the API you will need an HTTP client that is capable of HTTPS communication,
pre-emptive authentication, setting request headers, reading response status codes and reading
the response body.
https
The API requires the use of simple HTTPS in all communication.
For information, the server doc says this when using curl :
curl -u yourusername:yourpassword -v --data "rpId=YOUR_RPID&startTime=2013-10-01T08:27:00&duration=600&title=SONG TITLE&artist=ARTIST" -X POST "https://___________"
For the time (will look further in this another time), I use a php script between proppfrexx and the server. EXEC_SEND_HTTP_POST send the data with no authentification to the php script. The script take the same data and send it to the API.
Thanks
Just this :
API Usage
In order to use the API you will need an HTTP client that is capable of HTTPS communication,
pre-emptive authentication, setting request headers, reading response status codes and reading
the response body.
https
The API requires the use of simple HTTPS in all communication.
For information, the server doc says this when using curl :
curl -u yourusername:yourpassword -v --data "rpId=YOUR_RPID&startTime=2013-10-01T08:27:00&duration=600&title=SONG TITLE&artist=ARTIST" -X POST "https://___________"
For the time (will look further in this another time), I use a php script between proppfrexx and the server. EXEC_SEND_HTTP_POST send the data with no authentification to the php script. The script take the same data and send it to the API.
Thanks
Re: Trouble using EXEC_SEND_HTTP_POST with credentials
That sounds like the API from radioplayer.org.
I just had a test with them (Anna Pettersen) and its is working fine.
Unfortunately their https URL as given in docs was incorrect - so after providing the correct one all was working well.
Here is the command we used with the 'Streaming.OnSongTitleChanged' event:
Note: Make sure to use the latest v4.1.3.1 of ProppFrexx.
I just had a test with them (Anna Pettersen) and its is working fine.
Unfortunately their https URL as given in docs was incorrect - so after providing the correct one all was working well.
Here is the command we used with the 'Streaming.OnSongTitleChanged' event:
Code: Select all
EXEC_SEND_HTTP_POST username|password|https://ingest.mereradio.dk/ingestor/metadata/v1/np/|rpId=yourid&*[DATE:{${now}}:{utc}:{0}:{o}]&duration=${playtimesec}&title=${title}&artist=${title}
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
Re: Trouble using EXEC_SEND_HTTP_POST with credentials
Perfect !
That's exactly the piece of script I was looking for
Thank you !
That's exactly the piece of script I was looking for
Thank you !
Re: Trouble using EXEC_SEND_HTTP_POST with credentials
After few tries, the working command for Radioplayer API is (in our case) :
EXEC_SEND_HTTP_POST user|password|https://ingest.__________/ingestor/metadata/v1/np/|rpId=_____&startTime=*[STRING:{*<DATE:{${now}}:{utc}:{0}:{o}>}:{rpad}:{19}]&duration=*[TOINT:{${cpltimeremain}}:{round}]&title=${cpltracktitlecurrent}&artist=${cpltrackartistcurrent}&imageUrl=https://___________/cover_${VAR:time}.jpg
Thank you for your help !
EXEC_SEND_HTTP_POST user|password|https://ingest.__________/ingestor/metadata/v1/np/|rpId=_____&startTime=*[STRING:{*<DATE:{${now}}:{utc}:{0}:{o}>}:{rpad}:{19}]&duration=*[TOINT:{${cpltimeremain}}:{round}]&title=${cpltracktitlecurrent}&artist=${cpltrackartistcurrent}&imageUrl=https://___________/cover_${VAR:time}.jpg
Thank you for your help !
-
- Posts: 30
- Joined: 10 Feb 2017 14:20
Re: Trouble using EXEC_SEND_HTTP_POST with credentials
Thanks to Bernd, this worked for my setup:
EXEC_SEND_HTTP_POST User|Password|https://ingest.mereradio.dk/ingestor/metadata/v1/np/|rpId=1234&startTime=*[STRING:{*<DATE:{${now}}:{utc}:{0}:{o}>}:{rpad}:{19}]&duration=*[TOINT:{${playtimesec}}:{round}:{0.5}]&title=${title}&artist=${artist}
EXEC_SEND_HTTP_POST User|Password|https://ingest.mereradio.dk/ingestor/metadata/v1/np/|rpId=1234&startTime=*[STRING:{*<DATE:{${now}}:{utc}:{0}:{o}>}:{rpad}:{19}]&duration=*[TOINT:{${playtimesec}}:{round}:{0.5}]&title=${title}&artist=${artist}