Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "content-type" to connheaders() #22

Merged
merged 1 commit into from
Dec 1, 2021
Merged

Add "content-type" to connheaders() #22

merged 1 commit into from
Dec 1, 2021

Conversation

jchvz
Copy link
Contributor

@jchvz jchvz commented Dec 1, 2021

Neo4j now requires a Content Type header in all API requests. I added it here by changing the connheaders() function.

"content-type": "application/json"
function connheaders(c::Connection)
  headers = Dict(
    "Accept" => "application/json; charset=UTF-8",
    "content-type" => "application/json",
    "Host" => "$(c.host):$(c.port)")
  if c.user != "" && c.password != ""
    payload = "$(c.user):$(c.password)" |> base64encode
    headers["Authorization"] = "Basic $(payload)"
  end
  headers
end

For me, none of the functions were working until I added this. I am using Neo4j 4.3.6.

Thanks for your work, I am liking the automatic DataFrame feature.

@glesica glesica merged commit 2b6da15 into glesica:master Dec 1, 2021
@jchvz
Copy link
Contributor Author

jchvz commented Dec 1, 2021

Hi @glesica ,

I know this library isn't maintained anymore, but will this update be released? I believe it solves the connection problems that others were describing.

It works on Neo4j 4.3.6 for me:
image

I think it would be valuable to have the version that comes down with using Neo4j work again. Maybe it just needs for travis to be turned back on again; unfortunately I don't really understand the release process.

Thanks

@glesica
Copy link
Owner

glesica commented Dec 3, 2021

I haven't done a Julia release in quite a while. As I recall, there's a repo you have to PR into to update the version, but they do a bunch of checks on the package before they allow it, and I'm not sure this package would pass muster any more. I'm unwilling to put much effort into it, but if someone wants to figure out how to do it and do the legwork, go for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants