I’m trying to POST the following xml to a server url, but i don’t know how to go about it. GET requests are easy enough, but I’m having a problem with POST requests.
<? xml version=1.0>
<Request>
<Elemtnt>
<data id="1">E1203</data>
<data id="2">E1204</data>
</Element>
</Request>
Recreate a string like this:
String myXML = "<?xml version=1.0> <Request> <Elemtnt> <data id=\"1\">E1203</data> <data id=\"2\">E1204</data></Element></Request>";and use the same string in my previous answer: How to attach XML file in message body of HTTP post request?