PUTing a XML String
I have a pipeline that goes through some work manipulating data, then starts using a XML Generator Snap to make a bunch of XML documents that need to get PUT to a REST API. Simplified, example of a document.
[ {"xml":"<?xml version="1.0" encoding="UTF-8"?><import-record type-id="14417"><native><field name="title"><text>Some Title</text></field></native></import-record>"}]
Based on that document in the REST PUT, I set the HTTP entity to $xml, and then I inspect whats’s being PUT on the other side, instead of seeing the XML document as the body of the PUT I’m getting an array of 1 string with the XML document. How do I get this just to PUT the doucment directly. Example of what I’m getting on the receiving side below:
["<?xml version=\"1.0\" encoding=\"UTF-8\"?><import-record type-id..."]
Overview of Pipeline in case it helps to talk about it:
Hi @RoyB ,
I have attached sample pipeline, please try it and let me know if it helps you.
CSV to TXT pipeline_2022_02_28.slp (8.4 KB)
The thing is that in the “Mapper” we set content-type to text/plain in order to save the file as .txt
BR,
Marjan