Forum Discussion

Max's avatar
Max
New Contributor II
2 years ago

Convert to XML while updating headers

Hello,

Im trying to convert json payload to XML and I also need to update the headers like http status codes. I can achieve this using the document to binary snap but when I convert to xml using the XML formatter I lose the ability to update the headers. Can anyone point me in the right direction or can this even be done?

Thanks for your help

1 Reply

  • bojanvelevski's avatar
    bojanvelevski
    Valued Contributor

    Hi Max,

    Split the headers from the body (payload) by using router snap. Do the conversion on the body to XML, and join the data back. You can achieve this with a child pipeline to keep the payload and headers related.

    Regards,

    Bojan