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

Ability to force newline at end of request body #292

Closed
jimmcslim opened this issue Nov 16, 2018 · 4 comments
Closed

Ability to force newline at end of request body #292

jimmcslim opened this issue Nov 16, 2018 · 4 comments

Comments

@jimmcslim
Copy link

The Elasticsearch Bulk API requires that the request body have a final newline character. However it seems that VS Code REST Client trims leading and trailing whitespace from the request body, which I agree is a reasonable thing to do.

However, without the final newline character in this case, Elasticsearch ignores the last record in the bulk update operation.

It would be good if there was a simple way to specify to VS Code REST Client that some whitespace is actually significant!

@Huachao Huachao added the bug label Nov 16, 2018
@Huachao
Copy link
Owner

Huachao commented Feb 16, 2019

@jimmcslim @michelemauro so in this case the content type header of request body should be Content-Type: application/x-ndjson according to ES bulk API doc , right ?

@Huachao Huachao added enhancement and removed bug labels Feb 16, 2019
@jimmcslim
Copy link
Author

Yes, that appears to be the case.

@Huachao
Copy link
Owner

Huachao commented Feb 18, 2019

@jimmcslim @michelemauro @esurijon I have fixed the issue that append a newline character to the end of the request body for x-ndjson MIME type. And this fix will be published in next release.

@Huachao Huachao closed this as completed Feb 18, 2019
@Huachao
Copy link
Owner

Huachao commented Mar 6, 2019

@jimmcslim @michelemauro @esurijon you can try the latest version to verify

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

No branches or pull requests

2 participants