From 221f9a9798779dcb16197d330cf1178723f0754e Mon Sep 17 00:00:00 2001 From: Tomas Della Vedova Date: Fri, 11 Feb 2022 09:19:34 +0100 Subject: [PATCH] Upgrade transport (#1618) --- package.json | 2 +- src/client.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9905a3fca..7e724b885 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "xmlbuilder2": "^3.0.2" }, "dependencies": { - "@elastic/transport": "^8.0.0-beta.2", + "@elastic/transport": "^8.0.1", "tslib": "^2.3.0" }, "tap": { diff --git a/src/client.ts b/src/client.ts index 42e78dbc7..92650608a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -251,7 +251,12 @@ export default class Client extends API { context: options.context, productCheck: 'Elasticsearch', maxResponseSize: options.maxResponseSize, - maxCompressedResponseSize: options.maxCompressedResponseSize + maxCompressedResponseSize: options.maxCompressedResponseSize, + vendoredHeaders: { + jsonContentType: 'application/vnd.elasticsearch+json; compatible-with=8', + ndjsonContentType: 'application/vnd.elasticsearch+x-ndjson; compatible-with=8', + accept: 'application/vnd.elasticsearch+json; compatible-with=8,text/plain' + } }) this.helpers = new Helpers({