In order to control a web service I'm using, I need to send a POST request of the following data. How would I format this into html that sends the POST request when there's a click event or button press?
<sci_request version="1.0">
<data_service>
<targets>
<device id="00000000-00000000-90A2DAFF-FF050000"/>
</targets>
<requests>
<device_request target_name="myTarget">
my payload string
</device_request>
</requests>
</data_service>
Here's the jquery code I'm trying to execute this from:
$('#button1').click(function(){$.post('--SERVER--', {--THE POST OF INFO FROM ABOVE--});});