“JQuery Ajax Cors” Code-Antworten

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);

      });
Ankur

JQuery Ajax Cors

$.ajax({url: "http://localhost:8079/students/add/",type: "POST",crossDomain: true,data: JSON.stringify(somejson)dataType: "json",success: function (response{var resp = JSON.parse(response)alert(resp.status);},error: function (xhr, status) {alert("error");}});
Crazy Cardinal

JQuery Ajax Cors

$.ajax({url: "http://localhost:8079/clients/add/",type: "POST",crossDomain: true,data: JSON.stringify(somejson)dataType: "json",success: function (response{var resp = JSON.parse(response)alert(resp.status);},error: function (xhr, status) {alert("error");}});
Crazy Cardinal

Ähnliche Antworten wie “JQuery Ajax Cors”

Fragen ähnlich wie “JQuery Ajax Cors”

Weitere verwandte Antworten zu “JQuery Ajax Cors” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen