From 2c5519c25322bfa6662c4f77f6f2e1764bfa6b15 Mon Sep 17 00:00:00 2001 From: Joe Fleming Date: Thu, 21 Jul 2016 14:31:32 -0700 Subject: [PATCH] pass headers on job creation --- src/job.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/job.js b/src/job.js index b478492..2894752 100644 --- a/src/job.js +++ b/src/job.js @@ -48,6 +48,10 @@ export default class Job extends events.EventEmitter { } }; + if (options.headers) { + indexParams.headers = options.headers; + } + this.ready = createIndex(this.client, this.index, this.doctype, this.indexSettings) .then(() => this.client.index(indexParams)) .then((doc) => {