Organizational Research By

Surprising Reserch Topic

cors jquery ajax request


cors jquery ajax request  using -'jquery,ajax,request,cors'

I'm having troubles with an ajax request. I was getting the error

No 'Access-Control-Allow-Origin' header is present on the requested resource.

So what i tried was this jQuery ajax request:

var request = $.ajax({
    type: 'GET',
    url: url,
    dataType: "json",
    xhrFields: {
        withCredentials: true
    }});
request.done(function(data){
    console.log(data);
});    


But it is still not working. I am still getting the error.

How should i fix this?
    
asked Sep 14, 2015 by BecMcdade
0 votes
6 views



Related Hot Questions



Government Jobs Opening


...