Uber Price API收到错误跨域读取阻止(CORB)被阻止

时间:2018-08-06 08:11:21

标签: ajax cors uber-api

location.html:1无法加载https://sandbox.gw.eu.ebaocloud.com/Naturami/0.1/v1/estimates/price?start_latitude=18.9743224&start_longitude=73.1054429&end_latitude=19.0360271&end_longitude=73.0902748:所请求的资源上没有'Access-Control-Allow-Origin'标头。因此,不允许访问来源“ http://localhost:8181”。 跨域读取阻止(CORB)阻止了MIME类型为application / json的跨域响应https://sandbox.gw.eu.ebaocloud.com/Naturami/0.1/v1/estimates/price?start_latitude=18.9743224&start_longitude=73.1054429&end_latitude=19.0360271&end_longitude=73.0902748。有关更多详细信息,请参见https://www.chromestatus.com/feature/5629709824032768

//Uber Price Detail
var URL_Price="https://sandbox.gw.eu.ebaocloud.com/Naturami/0.1/v1/estimates/price?start_latitude="+lat+"&start_longitude="+lng+"&end_latitude="+endlat+"&end_longitude="+endlng+"";
var settings_price = { 
"async": true,
"crossDomain": true,
"url": URL_Price,
"method": "GET",
headers: {
'Authorization': 'Bearer KA.eyJ2ZXJzaW9uIjoyLCJpZCI6IlRuMTlUSTQ1VDdlTlZmYVFFU3NLenc9PSIsImV4cGlyZXNfYXQiOjE1MzYwMzQ3MTIsInBpcGVsaW5lX2tleV9pZCI6Ik1RPT0iLCJwaXBlbGluZV9pZCI6MX0.MjcR_6P1bYOkxcI49kuJQflO_bUevhuQ0nDJlqOuNFo',
"Content-Type": "application/json"
 }
 }

 $.ajax(settings_price).done(function (response1) {
 console.log(response1); 
 }); 

0 个答案:

没有答案