visionmedia/superagent — Issue #64: Is there a non valid char or json in this request ?
Author: lundin
Created: 2012-02-01 03:12:21+00:00
State: open

Hi,

Trying to send this to neo4j, and it breaks some BadInput rest format (I cant understand from the log). Doing a cURL in their webadmin console get the results cirrectly, so i it might be something with the library/superagent ? Can i use ? in the url and i guess the properties json is ok as well ?

request
.post('http://localhost:7474/db/data/index/node/users?unique')
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')
.send({"key": "name", "value": "myname", "properties": {"name": "myname", "pass": "dd7f89ad79f"}})
.end(function(res){
if (res.ok) {
console.log('yay got ' + JSON.stringify(res.body));
} else {
console.log('Oh no! error ' + res.text);
}
});

Thanks for a great nodejs extension!