Can Watcher POST Webhook contain XML in the body?

Can Watcher POST Webhook contain XML in the body? I have been using Sense (The Chrome Plugin) to send my watches, but when I try to create one using XML as part of a custom header POST Webhook Watch, I am unable to because of issues with double quotes with my XML in my body. I have tried using single quotes in my XML and that at least let's me curl the Watch, but then the action part of my Watch is what always fails with a "reason": "ConnectException[Connection refused]", even though the connection should be working.

Heres how my action looks like:

"actions" : {
"my_webhook" : {
"webhook" : {
"method" : "POST",
"host" : "host.sub.sub.com",
"port" : 3492,
"path": "/thePath",
"headers" : {
"Content-Type" : "application/x-www-form-urlencoded"
},
"body" : "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:sum="http://host.sub.com/path/path2/sum_2" xmlns:soapenv="http://host.sub.com/path/path2/">soapenv:Header/soapenv:Bodysum:Boomsum:Word1value</sum:Word1>sum:Word2value</sum:Word2>sum:Word3Value</sum:Word3>sum:Word4Value</sum:Word4>sum:Word5Value</Word5:Ok>sum:Word8value</sum:Word8>sum:Word9value</sum:Word9>sum:Word10value</sum:Word10>"</sum:Boom></soapenv:Body></soapenv:Envelope>"
}
}
}

Thanks in advance, this thing is driving me nuts!

-Chrome

Hey,

you still have to produce valid JSON, no matter what you put in the body. In this example this implies you need to escape the double ticks like this \"..

hope this helps.

--Alex

1 Like