We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The compatibility headers cannot be used with the client
Accept: "application/vnd.elasticsearch+json;compatible-with=7" Content-Type: "application/vnd.elasticsearch+json;compatible-with=7"
I tried to set the headers like this
elastic.SetHeaders(http.Header{ "Accept": { "application/vnd.elasticsearch+json", "compatible-with=7", }, "Content-Type": { "application/vnd.elasticsearch+json", "compatible-with=7", }, })
but the the PerformRequest doesn't honor the Content-Type header, in several places in request.go that header is set explicitly to application/json https://github.com/olivere/elastic/blob/release-branch.v7/request.go#L27 https://github.com/olivere/elastic/blob/release-branch.v7/request.go#L59
Content-Type
application/json
Any request to Elasticsearch will fail because the Content-Type doesn't have the compatible-with option set.
compatible-with
[*] elastic.v7 (for Elasticsearch 7.x) [ ] elastic.v6 (for Elasticsearch 6.x) [ ] elastic.v5 (for Elasticsearch 5.x) [ ] elastic.v3 (for Elasticsearch 2.x) [ ] elastic.v2 (for Elasticsearch 1.x)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The compatibility headers cannot be used with the client
I tried to set the headers like this
but the the PerformRequest doesn't honor the
Content-Type
header, in several places in request.go that header is set explicitly toapplication/json
https://github.com/olivere/elastic/blob/release-branch.v7/request.go#L27
https://github.com/olivere/elastic/blob/release-branch.v7/request.go#L59
Any request to Elasticsearch will fail because the
Content-Type
doesn't have thecompatible-with
option set.Which version of Elastic are you using?
[*] elastic.v7 (for Elasticsearch 7.x)
[ ] elastic.v6 (for Elasticsearch 6.x)
[ ] elastic.v5 (for Elasticsearch 5.x)
[ ] elastic.v3 (for Elasticsearch 2.x)
[ ] elastic.v2 (for Elasticsearch 1.x)
The text was updated successfully, but these errors were encountered: