Ajax call error + Access-Control-Allow-Origin RRS feed

  • Question

  • User-1353043493 posted

    i get below error during ajax call. any one can help on this?

    XMLHttpRequest cannot load https://mail.google.com/mail/feed/atom/?_=1482522512592. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 405.

    crossDomain: true,
    contentType: "application/json; charset=utf-8",
    type: "GET",
    url: "https://mail.google.com/mail/feed/atom/",
    dataType: "xml",
    cache: false,
    success: function (result) {
    alert("XML File is loaded!");

    Friday, December 23, 2016 7:52 PM

All replies