问题
I need to create a few nodes in neo4j and for that I am using json and curl inside my c++ program.
This is the request and response that I get back.
About to connect() to localhost port 7474 (#0)
Trying ::1...
Connection refused
Trying 127.0.0.1...
Connected to localhost (127.0.0.1) port 7474 (#0)
POST /db/data/cypher HTTP/1.1
Host: localhost:7474
Accept: */*
Content-Type: application/json
Content-Length: 4294967295
Expect: 100-continue
HTTP/1.1 100 Continue
{
"params" : {
"props" : {
"LocalAsNumber" : 0,
"NodeDescription" : "10TiMOS-B-4.0.R2 ",
"NodeId" : "10.227.28.95",
"NodeName" : "BLR_WAO_SARF7"
}
},
"query" : "CREATE (n:Router { props }) RETRUN n"
}
HTTP/1.1 500 Server Error
Content-Type: text/html; charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 0
Server: Jetty(9.0.5.v20130815)
HTTP error before end of send, stop sending
Closing connection 0
I am always getting this "500 Server Error". Is something wrong with the query?
回答1:
Look at your query:
"CREATE (n:Router { props }) RETRUN n"
It should be RETURN:
"CREATE (n:Router { props }) RETURN n"
来源:https://stackoverflow.com/questions/22684369/neo4j-cypher-json-giving-http-500-server-erro