openhab / openhab-core

Core framework of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
913 stars 421 forks source link

Support PATCH in HTTP core actions #3762

Open alackmann opened 1 year ago

alackmann commented 1 year ago

The HTTP binding currently supports GET, POST, PUT, DELETE and the related method calls via jsscripting. This is missing the not often used, but sometimes critical PATCH method that is commonly used to make updates to a collection without replacing all it's contents.

Without this method, workarounds can sometimes be found by using POST or PUT, but these risk overwriting server-side data that OpenHAB is not aware of OR by shelling out to the O/S and using curl which isn't ideal.

Now that we have more featureful scripting languages like JS and Ruby etc, I expect scripting developers will be more ambitious with the types of things they can achieve. To support this, it would be ideal if HTTP could be extended to support PATCH to avoid these messy workarounds and make the Binding more complete.

openhab-bot commented 1 year ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/sending-a-http-patch-in-javascript-ecmascript-2021-rules/143196/4

J-N-K commented 1 year ago

The HTTP actions are not provided by the HTTP binding but are core actions.