2017-03-08 47 views
0

通過http請求調用第三方url在Edge瀏覽器中不起作用。 我使用此代碼邊緣瀏覽器http請求不起作用

$http({ 
    url: url, 
    method: 'POST', 
    headers: { 
     'Content-Type': 'application/x-www-form-urlencoded', 
     'Authorization':Authorization, 
    }, 
    data: 'grant_type=client_credentials' 
}).then(function (data, status, headers, config) {}); 
+0

在其他瀏覽器中工作正常嗎? – Arun

+0

是的,它的工作在Firefox和Chrome ... –

+0

你在控制檯看到什麼錯誤?按'F12'打開'Developer Tools'並導航到'Console'。看看是否有東西在控制檯中彈出。 – Arun

回答

0

也許是因爲Web瀏覽器的政策,禁止的請求不相同的主機的跨域。

+0

我得到這個錯誤 XMLHttpRequest:網絡錯誤0x80070005,訪問被拒絕。 –