AJAX中的错误“ net :: ERR_CERT_AUTHORITY_INVALID”

时间:2019-12-03 07:49:47

标签: javascript ajax

我正在尝试发出类似http的请求:

function foo() {
$.ajax({
            async: true,
            crossDomain: true,
            url: "https://192.168.xxx.xxx/api/Domains/GetDomains/false",
            type: "GET",
            contentType: false,
            success: function (data, textStatus, jqXHR) {
                console.log(data);
            },
            error: function (jqXHR, textStatus, errorThrown) {
                console.log(jqXHR.responseText);
            }            
        });
}
$(document).ready(function () {
    foo();
});

但是我收到错误消息:

enter image description here

我尝试过邮递员,它奏效了,为什么我通过代码尝试时收到此错误?

0 个答案:

没有答案