Skip to content

Fix RestClientOptions building to not lose builtin headers #380

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

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

swallez
Copy link
Member

@swallez swallez commented Aug 18, 2022

This fixes RestClientOptions to ensure that built-in headers (Accept and the X-elastic-client-meta telemetry header) are always present, even when instantiating the transport with custom RequestOptions.

Also ensures ElasticsearchClient._transportOptions() is never null by falling back to the transport's options.

Fixes #377.

@swallez swallez changed the title Fix RestClientOptions building to not loose builtin headers Fix RestClientOptions building to not lose builtin headers Aug 18, 2022
@swallez swallez merged commit e3cbb1f into main Aug 18, 2022
@swallez swallez deleted the fix-request-options branch August 18, 2022 17:00
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.

Accept header lost if transport initialized with LLRC RequestOptions
1 participant