A third-party provided a service and I access it via POST multipart/form-data. I'm using $http angular to do the call, but it's working only in Chrome. If I use IE it works fine. How can I fix / debug that in a better way? Using Advanced REST Client, I'm able to get the response as well..
Just in case it helps, here is the http call:
var fd = new FormData();
var blob = new Blob([file], {type:'text/xml'}); //just an xml file on the scope..
fd.append('xml', blob, 'myfile.xml');
$http({
url: "https://myurl.at.third-party/mypath",
method: 'POST',
headers: {
'Content-Type': 'multipart/form-data',
'X-A-Custom-Header-They-Require': '<XMLData><User>myuser</User></XMLData>',
},
data: fd,
transformRequest: angular.identity
}).then(function(response) {
//do stuff
}, function(error) {
//handle error
});
In IE that call works, so I believe CORS is correctly set up on server, but it's IE, so who knows right? :)
If I look on Chrome Network tab, I can see it does an OPTIONS call first, get a OK response, but then I don't see the POST or get any return.
Does anyone knows how I could proceed?
Thanks!!