url = 'http://api.atompark.com/members/sms/xml.php'
xml = 'some xml'
When I use jquery, everything’s honky dory:
$.ajax({
method: 'POST',
url: url,
data: xml
}).done(function(r) {
return log(r);
});
But when I use HTTP package, I get an error:
HTTP.post(url, {
data: xml
}, function(e, r) {
return log(r.content);
});
XMLHttpRequest cannot load http://api.atompark.com/members/sms/xml.php. Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.
What could be wrong?