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 #2136: Support for additional HTTP headers in apoc.es procedures #3953

Merged
merged 1 commit into from Feb 26, 2024

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Feb 23, 2024

Fixes #2136

Issue changes

Added config parameter (optional) to all procedures, which is handled by ElasticSearchConfig.java.

This parameter can have an entry headers: <headerMap> which can be used to add headers to the default {content-type: "application/json", method: "<procedureMethod>"}.

The document created via apoc.es.post and apoc.es.postRaw in ElasticSearchTest.java are currently deleted with an apoc.es.postRaw in which the DELETE method is forced, since there is no apoc.es.delete.
But there is an issue to add it: https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/2999.

Although it is conceptually wrong for an apoc.es.post* to do a delete, I would leave it that way for now and change to the apoc.es.delete when it implemented.

Alternatively, we could put all these test cases within the static method insertDocuments() , without then having to do delete, but imo it is not an optimal solution.

Other changes

Created tests with getRaw and postRaw (even without config headers), which were not present

@RobertoSannino RobertoSannino merged commit 4f6ff8c into dev Feb 26, 2024
7 checks passed
@RobertoSannino RobertoSannino deleted the issue-2136 branch February 26, 2024 09:32
vga91 added a commit that referenced this pull request Mar 4, 2024
vga91 added a commit that referenced this pull request Mar 10, 2024
vga91 added a commit that referenced this pull request Mar 10, 2024
…ocedures (#3953) (#3986)

* [NOID] Fixes #2136: Support for additional HTTP headers in apoc.es procedures (#3953)

* [NOID] fix compile errors and code formatting

* [NOID] added license block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants