Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello, community!
I need to make a POST call to an external (non-ThingWorx) service with enctype multipart/form-data and include an XML file/message with the call. In return I should receive a response in XML. I've included a screenshot of a working solution from Postman. How would I do the same in ThingWorx?
I have looked at ContentLoaderFunctions and tried the PostXML snippet where I've used the content parameter to pass the XML input as a string. This doesn't work though; I'm getting the same response as I would get if I didn't pass any content at all. This is probably because the external service is expecting the XML as a file.
The PostMultipart snippet also looks very promising, and I've tried it by saving my XML file in a file repository and setting up the repository and pathOnRepository parameters. However, according to the documentation the PostMultipart output result is JSON and I'm getting back only a blank object {}.
I'm running ThingWorx version 7.3.4-b37.
Have you found any resolution to your problem? I am experiencing the same thing. I can get the POST request to work in Postman, but not by using "PostMultipart" in Thingworx.
Let me know if you have any advice.
Hello,
I am also in a similar situation where i need to send formdata with 4 key value pairs and two header information. Did anyone of you got the solution on this on how to send it.???
Thanks
Sunay