HTTP Binding: POST "content" not empty


I’m trying to deal with the REST API of “Proxmox” to start/stop virtual machines through openHAB. The state method works fine but the command method does not.
I already figured out what’s the reason for this issue:

The POST method always creates a string with the state value and inserts it into the request as “content”.

Excerpt from the log:

Sending to 'https://XYZ:8006/api2/..../status/shutdown': Method = {POST}, Headers = {Accept-Encoding: gzip, User-Agent: Jetty/9.4.43.v20210629, Content-Type: application/json, Authorization: PVEAPIToken=XXXX, Content = {shutdown}

The API endpoint can’t handle the content “{shutdown}”. So i need to send a POST request without any content. How can I realize this use case?


Can you post the configuration of your Thing and Channel, and also the Item linked to it?

Thing & Channel:

UID: http:url:proxmoxPVE
label: Proxmox Server
thingTypeUID: http:url
  authMode: BASIC
    - Authorization=PVEAPIToken=XXXXX
  ignoreSSLErrors: true
  baseURL: https://XYZ:8006/api2/json
  delay: 0
  stateMethod: GET
  refresh: 30
  commandMethod: POST
  contentType: application/json
  timeout: 3000
  bufferSize: 2048
  - id: lxc117
    channelTypeUID: http:switch
    label: LXC Server
    description: ""
      onValue: running
      offValue: stopped
      stateExtension: /nodes/pve/lxc/117/status/current
      commandExtension: /nodes/pve/lxc/117/status/%2$s
      stateTransformation: JSONPATH:$.data.status


The item is a “simple” switch.


Did you try to send commands using the get method ? I always use Firefox with RESTer to test what is the protocol and actual message format to use.

The API rejects start/stop commands by using the GET method. The POST method would work fine when the HTTP binding would send an empty “content”.