Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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

      });
Comment

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");}});
Comment

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");}});
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery link cdn 
Javascript :: Javascript get current year 
Javascript :: kill all node processes 
Javascript :: recursion countdown javascript 
Javascript :: js replace space with underscore 
Javascript :: load lodash chrome console 
Javascript :: center element react native 
Javascript :: laravel migration change to make a column nullable 
Javascript :: javascript replace all space 
Javascript :: javascript get body element 
Javascript :: react native text underline 
Javascript :: scoll to top on each route react 
Javascript :: refresh page every second javascript 
Javascript :: macos chrome disable web security 
Javascript :: how to clear cache of gradle 
Javascript :: javascript convert string to 2 decimal 
Javascript :: milliseconds to days javascript 
Javascript :: array sort using for loop in javascript 
Javascript :: javascript window resize listener 
Javascript :: google dino game hack 
Javascript :: enable/disable textbox on checkbox click using jquery 
Javascript :: hide search in datatable 
Javascript :: js set attribute aria-expanded 
Javascript :: gitignore all node_modules 
Javascript :: get current url host name in javascript 
Javascript :: document ready javascript vanilla 
Javascript :: upgrade node version ubuntu 
Javascript :: input will get only number vue 
Javascript :: moment format sql date 
Javascript :: javascript trello title swap 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =