1

I'm trying to read external data with REST API as in this tutorial.

https://thingsboard.io/docs/user-guide/rule-engine-2-0/tutorials/get-weather-using-rest-api-call/

The problem is that my server answers with XML text and not with a JSON payload. For this reason, the (blue) Script node within RuleChain does not accept the input and I cannot parse the XML text.

Does anyone know how to get around the problem? Should I use some other node? Or is there no solution?

Thank you.

Yasin Br
  • 1,675
  • 1
  • 6
  • 16
nick_bl
  • 23
  • 2
  • Can you add 'Content-Type': xml to the headers? Or something along those lines? – JacksonB May 25 '22 at 21:55
  • Hi @JacksonB, thank you for you answer! No, I cannot change the API output format... I was thinking to encapsulate the xml payload in a json payload but I would need a rulechain block to do that... – nick_bl Jul 08 '22 at 14:52

0 Answers0