I'm trying to integrate FedEx API in the web applications but I'm getting cors error. Here is my console error output, enter image description here
Can anyone please help to how to resolve this cors error in FedEx API integration?
Here is my code,
$.ajax({
type: "POST",
url: "https://wsbeta.fedex.com:443/web-services",
data: xmlData,
contentType: "text/xml",
dataType: "xml",
cache: false,
cors: true,
success: function(result) {
console.log('success');
console.log('result ', result);
},
error: function() {
console.log('Failed to Validate Shipment Request');
}
});