Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. curl -H "Content-Type: application/json"
  2. -H "Authorization: Basic `echo -n 'neo4j:neo4j' | base64`"
  3. -X POST -d '{"password":"nopass"}'
  4. http://localhost:7474/user/neo4j/password
  5.  
  6. var f = require('node-fetch');
  7. var url = 'http://neo4j:n0p4ss@localhost:7474/user/neo4j/password';
  8. var auth = new Buffer('neo4j:neo4j').toString('base64');
  9. f(url, {
  10. method: 'POST',
  11. body: {'password': 'nopass'},
  12. headers: {
  13. 'Content-Type': 'application/json',
  14. 'Authorization': 'Basic ' + auth
  15. }
  16. })
  17. .then(res => res.text())
  18. .then(txt => { console.log(txt); });
  19.  
  20. {
  21. "errors" : [ {
  22. "code" : "Neo.ClientError.Request.InvalidFormat",
  23. "message" : "Required parameter 'password' is missing."
  24. } ]
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement