REST PUT trouble

Hello,
I’m having trouble getting this command (which I’ve sent from my Hassio device successfully):
curl -X PUT -d "level=30" http://192.168.1.196:8181/airplay_devices/Computer/volume
to work, so far I’ve got this:
configuration.yaml (because it’s not include in the default config, and want to be sure I’m doing this right) :
rest_command: !include rest_command.yaml
rest_command.yaml:

  set_airplay_volume_computer:
    url: http://192.168.1.196:8181/airplay_devices/Computer/volume
    method: PUT
    payload: 'level={{ vol }}'

in scripts.yaml:

set_airplay_volume:
  alias: Set AirPlay Volume
  sequence:
    - service: rest_command.set_airplay_volume_computer
      data:
        vol: 10

I’ve also tried:

  set_airplay_volume_computer:
    url: http://192.168.1.196:8181/airplay_devices/Computer/volume
    method: PUT
    headers:
      accept: 'application/json, text/html'
    payload: 'level={{ vol }}'
    content_type:  'application/json; charset=utf-8'

and:

    url: http://192.168.1.196:8181/airplay_devices/Computer/volume
    method: PUT
    headers:
      accept: 'application/json, text/html'
    payload: '{level={{ vol }}}'
    content_type:  'application/json; charset=utf-8'

and quite a few other variations with no success, what am I doing wrong? Thanks!

Have you had any luck getting this working? If not, are there any errors? Unfortunately the rest_command does not output to the log what it’s trying to send.

I wonder if the payload needs to be formatted as a JSON:

payload: '{"level":"{{ vol }}"}'