Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Neo4j 2.2 AJAX authentication example
$.ajaxSetup({
headers: {
"Authorization": 'Basic ' + window.btoa(username+":"+password)
}
});
$.ajax(txUrl(), {
type: "POST",
data: JSON.stringify({
statements: [{
statement: query,
parameters: params || {},
resultDataContents: ["row", "graph"]
}]
}),
dataType: "json",
contentType: "application/json;charset=UTF-8",
error: function(err) {
...
},
success: function(res) {
...
}
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.