-
Notifications
You must be signed in to change notification settings - Fork 0
/
finder.js
41 lines (37 loc) · 864 Bytes
/
finder.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var Client = require('node-rest-client').Client;
var client = new Client();
module.exports = {
findBobBarker: function(subject){
return "Bob Barker is the best at " + subject;
},
findExpert: function(subject, url){
var thisData =
{
"statements": [
{
"statement": "MATCH (n:Person) RETURN n LIMIT 25",
"resultDataContents": [
"row",
"graph"
],
"includeStats": true
}
]
}
var results = ""
var args = {
headers: {
'Accept': "application/json, text/plain, */*",
'X-stream': true,
'Content-Type': "application/json; charset=utf-8",
'X-Ajax-': true,
},
data: thisData,
}
client.post(url, args, function(data, response){
console.log(data);
console.log(response);
return (data);
})
}
}