Calling java rest api on different domain from Word Web addin

0

I am creating a Word Web Add-in (javascript). I need to POST to a Java API from the add-in. I am getting the below error when making the ajax request:

SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

When I track it through Fiddler, I see:

Redirect for CORS preflight is not allowed
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005

My ajax call is:

$.ajax({
    "async": false,
    "crossDomain": false,    
    "url": "https://qa.dev.com:8443/web/check/",    
    "method": "POST",
    "data": d,
    "headers": {
        "content-type": "application/x-www-form-urlencoded",
    },
    "success": function (res) {
        console.log(res)
    },
    "error": function (jqXHR, textStatus, errorThrown) {
        console.log(jqXHR.statusText);

    }
});
javascript
office-js
asked on Stack Overflow Apr 12, 2018 by Varsha Khanna • edited Apr 12, 2018 by Marc LaFleur

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0