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

Fixes #1630: apoc.load.csv doesn't support basic auth #1726

Merged
merged 5 commits into from
Dec 7, 2020

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Nov 23, 2020

Fixes #1630

To make the procedure behavior consistent with the other loaders,
I added the apoc.load.csvParams procedure,
useful if I want to load a csv on a server that requires a header and / or a payload,
in the same way as apoc.load.jsonParams.

One sentence summary of the change.

Proposed Changes (Mandatory)

A brief list of proposed changes in order to fix the issue:

  • Added support to do a basic auth in apoc.load.csv with an url like http://user:password@host
  • Added apoc.load.csvParams similarly to apoc.load.jsonParams procedure
  • Added tests in LoadCsvTest.java to cover cases of the related issue
  • Moved extractCredentialsIfNeeded(url, failOnError) common method from LoadJson.java to Util.java
  • Added tests in LoadJsonTest.java to cover same cases of the issue
  • Added readerFor(String fileName, Map<String, Object> headers, String payload) method in FileUtils.java

@mneedham mneedham merged commit ca5ce01 into neo4j-contrib:4.1 Dec 7, 2020
vga91 added a commit to vga91/neo4j-apoc-procedures that referenced this pull request Dec 10, 2020
…eo4j-contrib#1726)

* fixes neo4j-contrib#1630: apoc.load.csv doesn't support basic auth

* code clean

* code clean

* changed tests

* changed tests LoadJson - LoadCsv
conker84 pushed a commit to conker84/neo4j-apoc-procedures that referenced this pull request Mar 23, 2021
…eo4j-contrib#1726)

* fixes neo4j-contrib#1630: apoc.load.csv doesn't support basic auth

* code clean

* code clean

* changed tests

* changed tests LoadJson - LoadCsv
fbiville pushed a commit that referenced this pull request Mar 25, 2021
* fixes #1630: apoc.load.csv doesn't support basic auth

* code clean

* code clean

* changed tests

* changed tests LoadJson - LoadCsv
conker84 pushed a commit to conker84/neo4j-apoc-procedures that referenced this pull request Mar 29, 2021
…eo4j-contrib#1726)

* fixes neo4j-contrib#1630: apoc.load.csv doesn't support basic auth

* code clean

* code clean

* changed tests

* changed tests LoadJson - LoadCsv
conker84 pushed a commit that referenced this pull request Apr 12, 2021
* fixes #1630: apoc.load.csv doesn't support basic auth

* code clean

* code clean

* changed tests

* changed tests LoadJson - LoadCsv
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.

apoc.load.csv doesn't support basic auth
2 participants