Hi guys, I am trying to create a piston and send commands from AskAlexa to webCoRE and than to the REST API of my Sony Bravia Android TV.
The problem is that I can’t find a way to send a XML message to the API of the TV (yes, it doesn’t support JSON for sending commands) and I am unable to set custom request headers. It’s my first piston so I am not sure if I am just not aware how to do that or it’s not possible yet.
Here is an example of the message I try to send:
POST /sony/IRCC HTTP/1.1
Host: 192.168.1.212
Content-Type: text/xml; charset="utf-8"
SOAPAction: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"
X-Auth-PSK: 0000
<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
<s:Body>
<u:X_SendIRCC xmlns:u=“urn:schemas-sony-com:service:IRCC:1”>
AAAAAQAAAAEAAAABAw==
</u:X_SendIRCC>
</s:Body>
</s:Envelope>
Thank you for the help!