Skip to content

Commit

Permalink
[INT-805] Add custom headers to the Onfleet requests via node-wrapper (
Browse files Browse the repository at this point in the history
…#80)

Added custom headers to all the requests
  • Loading branch information
YokySantiago authored Aug 18, 2022
1 parent cc146df commit de1d936
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/onfleet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit de1d936

Please sign in to comment.