Prevent Shortcuts from removing the XML response tags? #385
-
I created a simple shortcut to retrieve & update the config of an IP camera using the ISAPI protocol from HikVision. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, |
Beta Was this translation helpful? Give feedback.
Hello,
The
response.body
will actually give you the raw response body as a string. It doesn't remove any tags, so it should already work for what you are trying to achieve. I think the confusion here might stem from the fact that thealert
/showDialog
function (which I assume you probably used to inspect the response) interprets its input as HTML (or, a subset thereof). As such, it will not display any of the XML tags that aren't also valid HTML tags that it supports, leading to rather useless and confusing output. The content ofresponse.body
itself however still contains the tags. You can verify this by using thelogEvent(response.body)
function, which will create an entry in the Event…