I\'m trying to post XML data and then do a redirect to the current page, but I can\'t seem to get it to work.
When I do this:
This is an example on how to post with jQuery:
var data =
'' +
'This is a test ' +
'sample@example.com ' +
' '
$.support.cors = true;
$.ajax({
url: 'http://onehouse.freshdesk.com/helpdesk/tickets.xml',
type: 'POST',
crossDomain: true,
data: data,
dataType: 'text',
username: 'username1',
password: 'password1',
success: function (result) {
alert(result);
},
error: function (jqXHR, tranStatus, errorThrown) {
alert(
'Status: ' + jqXHR.status + ' ' + jqXHR.statusText + '. ' +
'Response: ' + jqXHR.responseText
);
}
});