Hi there.
I'm trying to POST XML via JavaScript to a REST API.
The Request Data looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EditGame xmlns="http://blahblahblah.com" >
<playerCount>2</playerCount>
<score>2621440</score>
</EditGame>
How do I define the postString above if my code looks like this below:
xhr.open('POST',URLgameUpdateAction);
xhr.setRequestHeader('Content-type','application/x-www.form-urlencoded');
xhr.send(**postString**);
Hope this makes sense.