Page 1 of 1

curl on blocky

Posted: Saturday 24 December 2016 11:57
by korniza
Merry Christmas to everyone.
I try to use curl on a blocky script but I did not find any way to run it. I also tried to search on forum but search return error.

Code: Select all

Forbidden

You don't have permission to access /forum/search.php?keywords=curl on this server.
the command I try to run from domoticz is the following

Code: Select all

curl -X POST -d "text=We wish you a merry Christmas and a happy new year" http://localhost:8010/google-home-notifier

Re: curl on blocky

Posted: Saturday 24 December 2016 11:58
by Egregius
What's wrong with the Messages > http block?

Re: curl on blocky

Posted: Saturday 24 December 2016 12:14
by korniza
how I can add the parameter on text using http block? sorry it is my first time I use this

Re: curl on blocky

Posted: Saturday 24 December 2016 12:46
by Egregius
Doesn't this work?

Code: Select all

http://localhost:8010/google-home-notifier?text="We wish you a merry Christmas and a happy new year"

Re: curl on blocky

Posted: Saturday 24 December 2016 12:53
by korniza
Egregius wrote:Doesn't this work?

Code: Select all

http://localhost:8010/google-home-notifier?text="We wish you a merry Christmas and a happy new year"
Nope. I tried http:// and open url but no action performed :(

Re: curl on blocky

Posted: Saturday 24 December 2016 13:00
by korniza
I think has to do with curl -X POST option.

Re: curl on blocky

Posted: Saturday 24 December 2016 13:37
by Egregius
If the other side doesn't accept a GET request you could put your curl in a shell script and call that script.