Curl in Exec issue

Im trying to get this curl command to work:

String Turf "thecurl" { exec="<[curl -d \"[{name:drassen}]\" -H \"Content-Type: application/json\" -s -S -v]" }

In a terminal it works perfectly, but in openhab no luck.

What i found to be suspiscious is the quotes around my submitted content type…and the default one isnt replaced:

Connected to ( port 80 (#0)
POST /unstable/users HTTP/1.1
User-Agent: curl/7.43.0
Accept: /
“Content-Type: application/json”
Content-Length: 16
Content-Type: application/x-www-form-urlencoded

Anyone? i tried to use ', ", ", ’ but nothing changes.

I ended up using executeCommandLine within a rule to get curl to work. I am sure if you mess with the syntax long enough, it would work, but i took the easy route.

executeCommandLine(“c:/curl/curl -d ‘’ http://ip:port/keypress/Home”)


Would be nice to get curl to work as intended though.

But hey, good workaround! will use it if it is proven impossible:)