openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.56k forks source link

[http] Add equivalent to MQTT binding's formatBeforePublish #12153

Open digitlength opened 2 years ago

digitlength commented 2 years ago

It would be great if the HTTP binding could implement the equivalent to the MQTT binding's formatBeforePublish feature. This would enable, for example, publishing a formatted JSON string inclusive of a variable without having to first use a rule and proxy Item.

Your Environment

runtimeInfo:
  version: 3.2.0
  buildString: Release Build
locale: en-GB
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.13
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.52+13-CA
  osName: Linux
  osVersion: 5.11.22-5-pve
  osArchitecture: amd64
  availableProcessors: 2
  freeMemory: 316363048
  totalMemory: 536870912
bindings:
  - astro
  - gpstracker
  - http
  - jellyfin
  - mqtt
  - network
openhab-bot commented 2 years ago

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

https://community.openhab.org/t/http-binding-send-json-body-in-put-request-restful-api/132566/4