i am using neo4j REST api and doing an jquery ajax call This is my first time with REST
i was trying to make a call like this:
$.ajax({
url: "http://localhost:7474/db/data/cypher",
accepts: "application/json; charset=UTF-8",
contentType:"application/json",
dataType:"json",
data:{
"query" : "start n = node(*) return n",
"params" : {}
},
type:"POSt",
success:function(data,xhr,status)
{
console.log(data);
},
error:function(xhr,err,msg){
console.log(xhr);
console.log(err);
console.log(msg);
}
});
using this i get following error:
XMLHttpRequest cannot load http://localhost:7474/db/data/cypher.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://localhost' is therefore not allowed access.
after this i googled it and got the answer HERE but i dont understand the error so i googled that also but it wasnt of any help so if anyone can tell me what this error means in lucid language and If i remove the contenttype
clause wont it create a problem in future
Thanks Alot
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…