Fetch with XML message

Hello everyone,

I’m trying to send an XML message to an API (Worldpay one), which only receive XML. With Postman, I can easily set the body to my request to raw, and put my XML in there and that’s pretty much it (with authorization header too).

But I don’t know how to do that in React Native, since transforming my XML in JSON won’t work… And I don’t know how to just copy and paste my XML message in my code… If anybody has an idea !


Well, if anyone search for that also, the answer is really simple. Put your xml header in a string and assign the body to that string… Yup, feeling silly, but if it can help someone…

Thanks for sharing the solution with our community!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.