CURL, SendHTTPRequest, to change rest items

Openhab 2.5.10

Trying to update some items in the REST-API
“link”: “http://172.16.1.231:8080/rest/items/IsSunset”,

I’ve tried CURL
executeCommandLine(“curl --header “Content-Type: text/plain” --request PUT --data “ON” http://172.16.1.231:8080/rest/items/IsSunset/state”)

Openhab won’t even let me load that:
Configuration model ‘Test.rules’ has errors, therefore ignoring it: [13,36]: missing ‘)’ at ‘Content’
[13,48]: mismatched input ‘:’ expecting ‘end’
I’ve tried so many variations with quotes I still can’t get it to load

I’ve tried sending an httpputrequest:
sendHttpPutRequest(“http://172.16.1.231:8080/rest/items/IsSunset”, “application/json”, ‘{“state”:“ON”}’)

When i run that, openhab log states:
Received HTTP PUT request at ‘items/IsSunset’ with an invalid item type ‘null’.

I just want to be able to update things like this to quickly test a series of rules.

How can i structure one of these to do what I’m attempting to do?

Thanks

Does this work

executeCommandLine("curl --header 'Content-Type: text/plain' --request POST --data 'ON' http://172.16.1.231:8080/rest/items/IsSunset", 2000)

?

No it doesn’t do anything. It loads; when i run it; i don’t even see a log entry.

I did mess around with my other one some more; i got it to load AND execute, BUT it doesn’t change the state of the item. So now I’m even more confused.

executeCommandLine("curl --header \"Content-Type: text/plain\" --request PUT --data \"ON\" http://172.16.1.231:8080/rest/items/IsSunset/state")

2021-01-23 11:13:32.163 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine ‘curl --header “Content-Type: text/plain” --request PUT --data “ON” http://172.16.1.231:8080/rest/items/IsSunset/state

I have found a solution:
sendHttpPutRequest("http://172.16.1.231:8080/rest/items/ZWaveNode_TILTZWAVE2ZWaveGarageDoorSensorGarageTilt_DoorStateDeprecated/state", "text/plain", 'OPEN')