From de1d936d1761fbdf78ed0f97f4e016500f4b7ed9 Mon Sep 17 00:00:00 2001 From: Santiago Botero Ruiz <39206812+YokySantiago@users.noreply.github.com> Date: Thu, 18 Aug 2022 13:48:08 -0500 Subject: [PATCH] [INT-805] Add custom headers to the Onfleet requests via node-wrapper (#80) Added custom headers to all the requests --- lib/onfleet.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/onfleet.js b/lib/onfleet.js index 69e0602..d7a9555 100644 --- a/lib/onfleet.js +++ b/lib/onfleet.js @@ -27,6 +27,15 @@ resources.Webhooks = require('./resources/Webhooks'); */ class Onfleet { + get customHeaders() { + return this.headers; + } + + set customHeaders(headers) { + this.headers = headers; + this.api.headers = { ...this.api.headers, ...this.customHeaders }; + } + constructor( apiKey, userTimeout,