Skip to content

Commit

Permalink
Merge pull request #95 from boomerang-io/add-cacheable-lookup
Browse files Browse the repository at this point in the history
Add cacheable lookup
  • Loading branch information
gchickma authored Jan 26, 2024
2 parents 4c70b7b + af5d212 commit 398e731
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions commands/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const URL = require("url");
const fs = require("fs");
const HTTPRetryRequest = require("../libs/HTTPRetryRequest");
const { checkIfEmpty, HEADERS, HEADERVALUES } = require("../libs/utilities");
const CacheableLookup = require("cacheable-lookup");

module.exports = {
/**
Expand Down Expand Up @@ -191,6 +192,8 @@ module.exports = {
opts.headers = {
...headerObject
};
const cacheable = new CacheableLookup();
opts.lookup = cacheable.lookup;

log.sys("Commencing to execute HTTP call with", reqURL, JSON.stringify(opts));

Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"system-sleep": "^1.3.6",
"twilio": "^3.73.0",
"url": "^0.11.0",
"wait-on": "^4.0.2"
"wait-on": "^4.0.2",
"cacheable-lookup": "^6.1.0"
},
"scripts": {
"test": "cross-env NODE_ENV=test mocha tests/**/*.spec.js",
Expand Down

0 comments on commit 398e731

Please sign in to comment.