I run this
var data = '{"rut" : "' + $('#cb_rut').val() + '" , "email" : "' + $('#email').val() + '" }';
var data = JSON.parse(data);
$.ajax({
type: 'GET',
url: 'linkserverApi',
success: function(success) {
console.log('Success!');
console.log(success);
},
error: function() {
console.log('Uh Oh!');
},
jsonp: 'jsonp'
});
And edit header in the response
'Access-Control-Allow-Methods' , 'GET, POST, PUT, DELETE'
'Access-Control-Max-Age' , '3628800'
'Access-Control-Allow-Origin', 'websiteresponseUrl'
'Content-Type', 'text/javascript; charset=utf8'