Http Binding XML Post

i like to run am XML Post. I need to do the same like

curl -X POST  http://ip:8080/user/var/120/10221/0/0/12187 -H "Content-Type: text/plain" -d 'value= 500'

my Channel:

ID: http:url:ETAXMLSolarMin
label: ETA XML Set Solar Min
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: http://192.168.188.24:8080/user/var/
  delay: 0
  stateMethod: GET
  refresh: 20
  commandMethod: POST
  contentType: text/plain
  timeout: 3000
  bufferSize: 2048
channels:
  - id: ETASolarSetMin
    channelTypeUID: http:number
    label: ETA Solar Set Min
    description: ""
    configuration:
      mode: READWRITE
      unit: °C
      stateExtension: 120/10221/0/0/12187
      commandContent: value=%2$s
      escapedUrl: false
      commandExtension: 120/10221/0/0/12187
      stateTransformation: XSLT:eta_numeric.xsl

my Item

label: ETA Solar Set Min
type: Number:Temperature
category: temperature
groupNames: []
tags:
  - Measurement

an

items.getItem('ETA_XML_Set_Solar_Min_ETA_Solar_Set_Min').sendCommand(50);

leeds to:

Requesting 'http://ip:8080/user/var/120/10221/0/0/12187' (method='POST', content='org.eclipse.jetty.client.util.StringContentProvider@5293241f') failed: 400 Bad Request

how do i need to configure the channel / Item to send the right content
Thanks

There is no such commandContent property. It looks like you intended to use the commandTransformation property. In which case it needs to be formatted as a transform (with the appropriate transform add-on installed), just like you have with the stateTransformation.

See here for an example that uses the regex transform to do something similar although there are other options as well such as a script transform:

I have this thing

UID: http:url:e5a14ec3b0
label: Lareira Sala
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: true
  baseURL: https://192.168.129.10:8000
  password: **********
  delay: 0
  stateMethod: POST
  refresh: 60
  commandMethod: POST
  contentType: text/plain
  timeout: 3000
  bufferSize: 2048
  username: *******
channels:
  - id: temp_obj
    channelTypeUID: http:number
    label: Set Temperature
    configuration:
      mode: READWRITE
      stateContent: idOperacion=1002
      commandTransformation: JS:cmdEcoforestTempObj.js
      stateExtension: /recepcion_datos_4.cgi
      commandExtension: /recepcion_datos_4.cgi
      stateTransformation: JS:getEcoforestTempObj.js

It uses cmdEcoforestTempObj.js stored in conf/transform to send requested temperature, whose contents are:

(function(i) {
    var resultado = "idOperacion=1019&temperatura=" + i;
    return resultado.trim();
})(input)

The item linked to this channel is

label: Temperatura Objectivo Lareira
type: Number:Temperature
category: heating
groupNames:
  - stove
tags:
  - Temperature
  - Setpoint

Maybe it helps.

Thanks a lot that works for me
Command Transformation with JS to set the Content of der Post Request