Can Watcher POST Webhook contain XML in the body?


(Chris) #1

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" : "",
"port" : 3492,
"path": "/thePath",
"headers" : {
"Content-Type" : "application/x-www-form-urlencoded"
"body" : "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:sum="" xmlns:soapenv="">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!


(Alexander Reelsen) #2


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.


(system) #3