Hi there, 
I have very little experience with Julia and want to try whether it fits my 
needs. I want to connect to a Neo4j database and send a Cypher statement 
with Julia, see http://neo4j.com/docs/stable/cypher-intro-applications.html 
.
The authorization works fine, but I could not manage to add the *json *keyword 
(or *data*).
using Requests, HttpCommon, Codecs

db_key = "neo4j"
db_secret = "mypasswd"

# create authentication 
function enc_credentials(db_key::String, db_secret::String)
    bearer_token_credentials = 
"$(encodeURI(db_key)):$(encodeURI(db_secret))"
    return(base64(bearer_token_credentials))
end
response = post(URI("http://localhost:7474/db/data/transaction/commit";),
                "grant_type=client_credentials";
                headers = {"Authorization" => "Basic 
$(enc_credentials(db_key,db_secret))", "Content-Type" => "application/json"
}, 
                json = {"statements"=>[{"statement"=>"CREATE (p:Person 
{name:{name},born:{born}}) RETURN p","parameters"=>{"name"=>"Keanu Reeves",
"born"=>1964}}]})

println(response)

This results in
ERROR: unrecognized keyword argument "json"

Reply via email to