Answers for "ajax add cors"

1

jquery ajax CORS

var settings = {
          'cache': false,
          'dataType': "jsonp",
          "async": true,
          "crossDomain": true,
          "url": "https://maps.googleapis.com/maps/api/distancematrix/json?units=metric&origins=place_id:"+me.originPlaceId+"&destinations=place_id:"+me.destinationPlaceId+"®ion=ng&units=metric&key=mykey",
          "method": "GET",
          "headers": {
              "accept": "application/json",
              "Access-Control-Allow-Origin":"*"
          }
      }

      $.ajax(settings).done(function (response) {
          console.log(response);

      });
Posted by: Guest on June-22-2020
0

adding cors parameters to extjs ajax

Ext.Ajax.request({
	... // Removed code for brevity
    cors: true,
    useDefaultXhrHeader : false,
    ... // Removed code for brevity
});
Posted by: Guest on May-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language