Giter Site home page Giter Site logo

Comments (3)

maxdemarzi avatar maxdemarzi commented on September 2, 2024

Crapola... wonder what's wrong... it's working for me...

require 'neography'
neo = Neography::Rest.new("http://98ad4c2cf:[email protected]:7700")
p neo.execute_query("start n = node(*) return count(n)")
{"columns"=>["count(n)"], "data"=>[[1]]}

from neography.

maxdemarzi avatar maxdemarzi commented on September 2, 2024

It's doing it twice ?!?!?!

sudo ngrep -l -q "^GET |^POST " tcp and port 7700

T 192.168.1.126:53202 -> 50.16.15.150:7700 [AP]
POST /db/data/cypher HTTP/1.1..Content-Type: application/json..Accept: application/json;stream=true..User-Agent: Neography/1.0.9..Date: Fri, 22 Mar 2013 01:19:53 GMT..Content-Length: 57..Ho
st: cc2ec4729.hosted.neo4j.org:7700....{"query":"start n = node(*) return count(n)","params":{}}

T 192.168.1.126:53202 -> 50.16.15.150:7700 [AP]
POST /db/data/cypher HTTP/1.1..Content-Type: application/json..Accept: application/json;stream=true..User-Agent: Neography/1.0.9..Authorization: Basic OThhZDRjMmNmOjA3NmNkN2QzMA==..Date: Fr
i, 22 Mar 2013 01:19:53 GMT..Content-Length: 57..Host: cc2ec4729.hosted.neo4j.org:7700....{"query":"start n = node(*) return count(n)","params":{}}

from neography.

ayosec avatar ayosec commented on September 2, 2024

Hi @maxdemarzi. Thanks for your fast reply.

I tested it with the Neo4j Heroku add-on. It works. We are using our own authentication system, and it seems that the problem is in our code. The Neo4j REST server sends a WWW-Authenticate: Basic realm="neo4j graphdb". header in the 401 reply, but our code doesn't. My bad.

I will update my server, and I guess that everything will be fine.

Neography makes two requests only the first time. The first one with no authentication, and then, when the 401 is received, it sends the user and password. Next requests will be always with the user/password. I guess that it will be better if the user/password is from the beginning, but it is only one extra request.

BTW, with the -W byline option in ngrep, the \n character is printed (instead of being a dot).

from neography.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.